Small browser open fixes

This commit is contained in:
crschnick 2024-09-08 15:54:20 +00:00
parent 439fc4dd03
commit 8c60eea4a7
2 changed files with 3 additions and 6 deletions

View file

@ -454,7 +454,7 @@ public final class OpenFileSystemModel extends BrowserSessionTab<FileSystemStore
}
public void initWithGivenDirectory(String dir) throws Exception {
cdSyncWithoutCheck(dir);
cdSync(dir);
}
public void initWithDefaultDirectory() {

View file

@ -77,15 +77,11 @@ public class BrowserSessionModel extends BrowserAbstractSessionModel<BrowserSess
});
}
public void openFileSystemSync(
public OpenFileSystemModel openFileSystemSync(
DataStoreEntryRef<? extends FileSystemStore> store,
FailableFunction<OpenFileSystemModel, String, Exception> path,
BooleanProperty externalBusy)
throws Exception {
if (store == null) {
return;
}
OpenFileSystemModel model;
try (var b = new BooleanScope(externalBusy != null ? externalBusy : new SimpleBooleanProperty()).start()) {
try (var sessionBusy = new BooleanScope(busy).exclusive().start()) {
@ -104,5 +100,6 @@ public class BrowserSessionModel extends BrowserAbstractSessionModel<BrowserSess
} else {
model.initWithDefaultDirectory();
}
return model;
}
}