Various bug fixes

This commit is contained in:
crschnick 2024-02-26 13:31:55 +00:00
parent dcbcab722c
commit 8d474c2640
4 changed files with 10 additions and 6 deletions

View file

@ -55,7 +55,7 @@ public class AppPrefs {
final BooleanProperty clearTerminalOnInit =
map(new SimpleBooleanProperty(true), "clearTerminalOnInit", Boolean.class);
public final BooleanProperty disableCertutilUse =
mapVaultSpecific(new SimpleBooleanProperty(false), "disableCertutilUse", Boolean.class);
map(new SimpleBooleanProperty(false), "disableCertutilUse", Boolean.class);
public final BooleanProperty useLocalFallbackShell =
map(new SimpleBooleanProperty(false), "useLocalFallbackShell", Boolean.class);
public final BooleanProperty disableTerminalRemotePasswordPreparation =

View file

@ -33,7 +33,6 @@ public class StandardStorage extends DataStorage {
StandardStorage() {
this.gitStorageHandler = GitStorageHandler.getInstance();
this.gitStorageHandler.init(dir);
}
@Override
@ -46,6 +45,12 @@ public class StandardStorage extends DataStorage {
return;
}
try {
FileUtils.forceMkdir(dir.toFile());
} catch (Exception e) {
ErrorEvent.fromThrowable(e).terminal(true).build().handle();
}
try {
initSystemInfo();
} catch (Exception e) {
@ -58,6 +63,7 @@ public class StandardStorage extends DataStorage {
ErrorEvent.fromThrowable(e).terminal(true).build().handle();
}
this.gitStorageHandler.init(dir);
this.gitStorageHandler.beforeStorageLoad();
var storesDir = getStoresDir();

View file

@ -83,9 +83,7 @@ public class FileOpener {
LocalShell.getShell().executeSimpleCommand(cmd);
}
case OsType.Linux linux -> {
LocalShell.getShell()
.executeSimpleCommand("mimeopen -a "
+ LocalShell.getShell().getShellDialect().fileArgument(localFile));
throw new UnsupportedOperationException();
}
case OsType.MacOs macOs -> {
throw new UnsupportedOperationException();

View file

@ -44,7 +44,7 @@ public class OpenFileWithAction implements LeafAction {
@Override
public boolean isApplicable(OpenFileSystemModel model, List<BrowserEntry> entries) {
return !OsType.getLocal().equals(OsType.MACOS)
return OsType.getLocal().equals(OsType.WINDOWS)
&& entries.size() == 1
&& entries.stream().allMatch(entry -> entry.getRawFileEntry().getKind() == FileKind.FILE);
}