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 = final BooleanProperty clearTerminalOnInit =
map(new SimpleBooleanProperty(true), "clearTerminalOnInit", Boolean.class); map(new SimpleBooleanProperty(true), "clearTerminalOnInit", Boolean.class);
public final BooleanProperty disableCertutilUse = public final BooleanProperty disableCertutilUse =
mapVaultSpecific(new SimpleBooleanProperty(false), "disableCertutilUse", Boolean.class); map(new SimpleBooleanProperty(false), "disableCertutilUse", Boolean.class);
public final BooleanProperty useLocalFallbackShell = public final BooleanProperty useLocalFallbackShell =
map(new SimpleBooleanProperty(false), "useLocalFallbackShell", Boolean.class); map(new SimpleBooleanProperty(false), "useLocalFallbackShell", Boolean.class);
public final BooleanProperty disableTerminalRemotePasswordPreparation = public final BooleanProperty disableTerminalRemotePasswordPreparation =

View file

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

View file

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

View file

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