Skip to content

Fix duplicate file name extension#161

Closed
nattress wants to merge 1 commit intoplotly:masterfrom
nattress:master
Closed

Fix duplicate file name extension#161
nattress wants to merge 1 commit intoplotly:masterfrom
nattress:master

Conversation

@nattress
Copy link

If a filename extension and a format are specified with the same string,
we create a file with a double file extension. Ie:

py.image.save_as(figure, 'filename2.png', 'png')

This will produce a file named filename2.png.png. When ext and format
are both present, the fix will only append format to the filename if the
format is different from ext. Ie:

py.image.save_as(figure, 'filename2.png', 'pdf')

This will create filename2.png.pdf.

If a filename extension and a format are specified with the same string,
we create a file with a double file extension. Ie:

```javascript
py.image.save_as(figure, 'filename2.png', 'png')
```
This will produce a file named filename2.png.png. When ext and format
are both present, the fix will only append format to the filename if the
format is different from ext. Ie:
```javascript
py.image.save_as(figure, 'filename2.png', 'pdf')
```
This will create filename2.png.pdf.
@theengineear
Copy link
Contributor

Apologies that this never got reviewed. It's pretty old at this point and I'm going to close down. If you want to rebase (or merge) master and reopen, I'll take another look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants