From c8acffeed882892cc2975ecfa7ddadc88442ee9c Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 23 Dec 2024 16:13:11 +0100 Subject: [PATCH] Just Delete link from entry if the file is no longer accesible on disk (#12324) * Just Delete link from entry if the file is no longer accesible on disk Fixes https://github.com/JabRef/jabref/issues/9731 * Update CHANGELOG.md Co-authored-by: Subhramit Basu Bhowmick --------- Co-authored-by: Subhramit Basu Bhowmick --- CHANGELOG.md | 1 + src/main/java/org/jabref/gui/linkedfile/DeleteFileAction.java | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8179e3d10ec..647bdee1d19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -128,6 +128,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We fixed an issue when click on entry at "Check Integrity" wasn't properly focusing the entry and field. [#11997](https://github.com/JabRef/jabref/issues/11997) - We fixed an issue with the ui not scaling when changing the font size [#11219](https://github.com/JabRef/jabref/issues/11219) - We fixed an issue where a custom application for external file types would not be saved [#112311](https://github.com/JabRef/jabref/issues/12311) +- We fixed an issue where a file that no longer exists could not be deleted from an entry using keyboard shortcut [#9731](https://github.com/JabRef/jabref/issues/9731) ### Removed diff --git a/src/main/java/org/jabref/gui/linkedfile/DeleteFileAction.java b/src/main/java/org/jabref/gui/linkedfile/DeleteFileAction.java index 6925cbd88d5..8da29943e2c 100644 --- a/src/main/java/org/jabref/gui/linkedfile/DeleteFileAction.java +++ b/src/main/java/org/jabref/gui/linkedfile/DeleteFileAction.java @@ -99,6 +99,7 @@ public void execute() { dialogTitle = Localization.lang("Delete '%0'", path.getFileName().toString()); } else { dialogService.notify(Localization.lang("Error accessing file '%0'.", linkedFile.getLink())); + deleteFiles(false); // Deleting a non-existing file is a success success = true; return;