mirror of
https://gitlab.com/kauron/jstudy
synced 2024-11-13 07:33:44 +01:00
Fix for last dir can be inaccessible
This commit is contained in:
parent
e9243520e4
commit
c827f36537
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ public class Controller implements Initializable {
|
|||
private void onLoadAction(ActionEvent event) {
|
||||
FileChooser chooser = new FileChooser();
|
||||
chooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("JStudy file", "*.jsdb"));
|
||||
if (AppConfig.lastDir != null) chooser.setInitialDirectory(AppConfig.lastDir);
|
||||
if (AppConfig.lastDir != null && AppConfig.lastDir.exists()) chooser.setInitialDirectory(AppConfig.lastDir);
|
||||
List<File> list = chooser.showOpenMultipleDialog(root.getScene().getWindow());
|
||||
if (list == null || list.isEmpty()) return;
|
||||
AppConfig.lastDir = list.get(0).getParentFile();
|
||||
|
|
Loading…
Reference in a new issue