diff --git a/app/src/main/java/io/xpipe/app/browser/FileContextMenu.java b/app/src/main/java/io/xpipe/app/browser/FileContextMenu.java index dba3e68d5..037fc8fc4 100644 --- a/app/src/main/java/io/xpipe/app/browser/FileContextMenu.java +++ b/app/src/main/java/io/xpipe/app/browser/FileContextMenu.java @@ -79,7 +79,10 @@ final class FileContextMenu extends ContextMenu { execute.setOnAction(event -> { ThreadHelper.runFailableAsync(() -> { ShellControl pc = model.getFileSystem().getShell().orElseThrow(); - pc.executeBooleanSimpleCommand(pc.getShellDialect().getMakeExecutableCommand(entry.getPath())); + var e = pc.getShellDialect().getMakeExecutableCommand(entry.getPath()); + if (e != null) { + pc.executeBooleanSimpleCommand(e); + } var cmd = pc.command("\"" + entry.getPath() + "\"").prepareTerminalOpen(); TerminalHelper.open(FilenameUtils.getBaseName(entry.getPath()), cmd); }); @@ -91,7 +94,10 @@ final class FileContextMenu extends ContextMenu { executeInBackground.setOnAction(event -> { ThreadHelper.runFailableAsync(() -> { ShellControl pc = model.getFileSystem().getShell().orElseThrow(); - pc.executeBooleanSimpleCommand(pc.getShellDialect().getMakeExecutableCommand(entry.getPath())); + var e = pc.getShellDialect().getMakeExecutableCommand(entry.getPath()); + if (e != null) { + pc.executeBooleanSimpleCommand(e); + } var cmd = ScriptHelper.createDetachCommand(pc, "\"" + entry.getPath() + "\""); pc.executeBooleanSimpleCommand(cmd); }); diff --git a/app/src/main/java/io/xpipe/app/issue/SentryErrorHandler.java b/app/src/main/java/io/xpipe/app/issue/SentryErrorHandler.java index f5572c791..837785a62 100644 --- a/app/src/main/java/io/xpipe/app/issue/SentryErrorHandler.java +++ b/app/src/main/java/io/xpipe/app/issue/SentryErrorHandler.java @@ -23,7 +23,6 @@ public class SentryErrorHandler { options.setEnableUncaughtExceptionHandler(false); options.setAttachServerName(false); // options.setDebug(true); - options.setDist(XPipeDistributionType.get().getId()); options.setRelease(AppProperties.get().getVersion()); options.setEnableShutdownHook(false); options.setProguardUuid(AppProperties.get().getBuildUuid().toString()); @@ -87,6 +86,7 @@ public class SentryErrorHandler { .toList(); atts.forEach(attachment -> s.addAttachment(attachment)); + s.setTag("dist", XPipeDistributionType.get().getId()); s.setTag("developerMode", AppPrefs.get() != null ? AppPrefs.get().developerMode().getValue().toString() : "false"); s.setTag("terminal", Boolean.toString(ee.isTerminal())); s.setTag("omitted", Boolean.toString(ee.isOmitted())); diff --git a/app/src/main/java/io/xpipe/app/util/ScriptHelper.java b/app/src/main/java/io/xpipe/app/util/ScriptHelper.java index eec2c07eb..18b08b61f 100644 --- a/app/src/main/java/io/xpipe/app/util/ScriptHelper.java +++ b/app/src/main/java/io/xpipe/app/util/ScriptHelper.java @@ -98,8 +98,10 @@ public class ScriptHelper { // processControl.executeSimpleCommand(type.getFileTouchCommand(file), "Failed to create script " + file); processControl.getShellDialect().createTextFileWriteCommand(processControl, content, file).execute(); - processControl.executeSimpleCommand( - type.getMakeExecutableCommand(file), "Failed to make script " + file + " executable"); + var e = type.getMakeExecutableCommand(file); + if (e != null) { + processControl.executeSimpleCommand(e, "Failed to make script " + file + " executable"); + } return file; } diff --git a/core/src/main/java/io/xpipe/core/util/JacksonMapper.java b/core/src/main/java/io/xpipe/core/util/JacksonMapper.java index 15c4bc83d..5ba4aa22c 100644 --- a/core/src/main/java/io/xpipe/core/util/JacksonMapper.java +++ b/core/src/main/java/io/xpipe/core/util/JacksonMapper.java @@ -15,8 +15,7 @@ import java.util.function.Consumer; public class JacksonMapper { private static final ObjectMapper BASE = new ObjectMapper(); - private static final ObjectMapper DEFAULT; - private static ObjectMapper INSTANCE = new ObjectMapper(); + private static final ObjectMapper INSTANCE; private static boolean init = false; public static T parse(String s, Class c) throws JsonProcessingException { @@ -40,11 +39,7 @@ public class JacksonMapper { .withCreatorVisibility(JsonAutoDetect.Visibility.NONE) .withIsGetterVisibility(JsonAutoDetect.Visibility.NONE)); - var modules = findModules(ModuleLayer.boot()); - objectMapper.registerModules(modules); - INSTANCE = BASE.copy(); - DEFAULT = BASE.copy(); } public static synchronized void configure(Consumer mapper) { @@ -76,15 +71,17 @@ public class JacksonMapper { */ public static ObjectMapper newMapper() { if (!JacksonMapper.isInit()) { - return DEFAULT; + return BASE; } + return INSTANCE.copy(); } public static ObjectMapper getDefault() { if (!JacksonMapper.isInit()) { - return DEFAULT; + return BASE; } + return INSTANCE; } diff --git a/ext/base/src/main/java/io/xpipe/ext/base/actions/DeleteStoreChildrenAction.java b/ext/base/src/main/java/io/xpipe/ext/base/actions/DeleteStoreChildrenAction.java index 73fcd4acb..46ec14b4f 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/actions/DeleteStoreChildrenAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/actions/DeleteStoreChildrenAction.java @@ -23,6 +23,10 @@ public class DeleteStoreChildrenAction implements ActionProvider { @Override public void execute() throws Exception { DataStorage.get().getStoreChildren(store,true).forEach(entry -> { + if (!entry.getConfiguration().isDeletable()) { + return; + } + DataStorage.get().deleteStoreEntry(entry); }); }