Skip to content

Commit

Permalink
Fixed entry duplication on file download (#6437)
Browse files Browse the repository at this point in the history
Co-authored-by: Benedikt Tutzer <benedikt.tutzer@gmail.com>
  • Loading branch information
btut and btut authored May 7, 2020
1 parent db3d409 commit a409c5f
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,6 @@ public void download() {
BackgroundTask<Path> downloadTask = prepareDownloadTask(targetDirectory.get(), urlDownload);
downloadTask.onSuccess(destination -> {
LinkedFile newLinkedFile = LinkedFilesEditorViewModel.fromFile(destination, databaseContext.getFileDirectoriesAsPaths(filePreferences), externalFileTypes);
linkedFile.setLink(newLinkedFile.getLink());
linkedFile.setFileType(newLinkedFile.getFileType());
entry.addFile(0, newLinkedFile);
});
downloadProgress.bind(downloadTask.workDonePercentageProperty());
Expand Down

0 comments on commit a409c5f

Please sign in to comment.