Skip to content

Commit

Permalink
Fix issue with empty fallback directory (#9134)
Browse files Browse the repository at this point in the history
  • Loading branch information
Siedlerchr authored Sep 4, 2022
1 parent 6d856b6 commit 41a1999
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/preferences/JabRefPreferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -2171,11 +2171,11 @@ public FieldWriterPreferences getFieldWriterPreferences() {
* @param originalDirectory the directory as configured
*/
private String determineMainFileDirectory(String originalDirectory) {
if (!originalDirectory.isEmpty()) {
if ((originalDirectory != null) && !originalDirectory.isEmpty()) {
// A non-empty directory is kept
return originalDirectory;
}
return Path.of(JabRefDesktop.getDefaultFileChooserDirectory(), "JabRef").toString();
return JabRefDesktop.getDefaultFileChooserDirectory().toString();
}

@Override
Expand Down

0 comments on commit 41a1999

Please sign in to comment.