Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lowercase file extension #6119

Merged
merged 2 commits into from
Mar 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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