diff --git a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java index 76489a593..1f5d0ddba 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java +++ b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java @@ -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 = diff --git a/app/src/main/java/io/xpipe/app/storage/StandardStorage.java b/app/src/main/java/io/xpipe/app/storage/StandardStorage.java index 21741487b..339d30225 100644 --- a/app/src/main/java/io/xpipe/app/storage/StandardStorage.java +++ b/app/src/main/java/io/xpipe/app/storage/StandardStorage.java @@ -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(); diff --git a/app/src/main/java/io/xpipe/app/util/FileOpener.java b/app/src/main/java/io/xpipe/app/util/FileOpener.java index bc6deaf20..fd0062149 100644 --- a/app/src/main/java/io/xpipe/app/util/FileOpener.java +++ b/app/src/main/java/io/xpipe/app/util/FileOpener.java @@ -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(); diff --git a/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenFileWithAction.java b/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenFileWithAction.java index d9174c3f9..832126fd9 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenFileWithAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/browser/OpenFileWithAction.java @@ -44,7 +44,7 @@ public class OpenFileWithAction implements LeafAction { @Override public boolean isApplicable(OpenFileSystemModel model, List 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); }