Skip to content

Commit

Permalink
Merge pull request JabRef#6119 from JabRef/lowercase-file-extension
Browse files Browse the repository at this point in the history
Lowercase file extension
  • Loading branch information
stefan-kolb authored Mar 14, 2020
2 parents 209d336 + a775858 commit 55171e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
### Fixed

- We fixed an issue where opening a library from the recent libraries menu was not possible. [#5939](https://github.com/JabRef/jabref/issues/5939)
- We fixed an issue with inconsistent capitalization of file extensions when downloading files [#6115](https://github.com/JabRef/jabref/issues/6115)

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,10 @@ public BackgroundTask<Path> prepareDownloadTask(Path targetDirectory, URLDownloa
BackgroundTask<Path> downloadTask = BackgroundTask
.wrap(() -> {
Optional<ExternalFileType> suggestedType = inferFileType(urlDownload);
String suggestedTypeName = suggestedType.orElse(StandardExternalFileType.PDF).getName();
ExternalFileType externalFileType = suggestedType.orElse(StandardExternalFileType.PDF);
String suggestedTypeName = externalFileType.getName();
linkedFile.setFileType(suggestedTypeName);

String suggestedName = linkedFileHandler.getSuggestedFileName(suggestedTypeName);
String suggestedName = linkedFileHandler.getSuggestedFileName(externalFileType.getExtension());
return targetDirectory.resolve(suggestedName);
})
.then(destination -> new FileDownloadTask(urlDownload.getSource(), destination))
Expand Down

0 comments on commit 55171e6

Please sign in to comment.