Skip to content

Commit

Permalink
add check to be sure that saved folder setting is an existing folder
Browse files Browse the repository at this point in the history
  • Loading branch information
optyfr committed Aug 15, 2024
1 parent e3f1dc9 commit 869be1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jrmfx/src/main/java/jrm/fx/ui/ProfilePanelController.java
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ private void importDat(final boolean sl)
final var filter2 = new ExtensionFilter(Messages.getString("MainFrame.MameExecutable"), SystemUtils.IS_OS_WINDOWS?"*mame*.exe":"*mame*");
chooser.getExtensionFilters().addAll(filter, filter2);
chooser.setSelectedExtensionFilter(filter);
Optional.ofNullable(session.getUser().getSettings().getProperty("MainFrame.ChooseExeOrDatToImport", workdir.getAbsolutePath())).map(File::new).ifPresent(chooser::setInitialDirectory);
Optional.ofNullable(session.getUser().getSettings().getProperty("MainFrame.ChooseExeOrDatToImport", workdir.getAbsolutePath())).map(File::new).filter(File::isDirectory).ifPresent(chooser::setInitialDirectory);
final var files = chooser.showOpenMultipleDialog(profilesList.getScene().getWindow());
importDat(files, sl);
if (files != null)
Expand Down

0 comments on commit 869be1b

Please sign in to comment.