From a2c03530a54fd262ea0fa45b2b338a1449850db2 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Fri, 16 Aug 2024 11:36:10 +0200 Subject: [PATCH] only support freedesktop autostart, if autostartCmd property is explicitly set --- .../linux/autostart/FreedesktopAutoStartService.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/org/cryptomator/linux/autostart/FreedesktopAutoStartService.java b/src/main/java/org/cryptomator/linux/autostart/FreedesktopAutoStartService.java index f36a135..43b9cb0 100644 --- a/src/main/java/org/cryptomator/linux/autostart/FreedesktopAutoStartService.java +++ b/src/main/java/org/cryptomator/linux/autostart/FreedesktopAutoStartService.java @@ -44,11 +44,7 @@ public FreedesktopAutoStartService() { var xdgConfigDirString = Objects.requireNonNullElse(System.getenv("XDG_CONFIG_HOME"), System.getProperty("user.home") + "/.config"); this.autostartFile = Path.of(xdgConfigDirString, "autostart", AUTOSTART_FILENAME); - var execValue = System.getProperty(CMD_PROPERTY); - if (execValue == null) { - LOG.debug("JVM property {} not set, using command path", CMD_PROPERTY); - execValue = ProcessHandle.current().info().command().orElse(""); - } + var execValue = System.getProperty(CMD_PROPERTY,""); this.hasExecValue = !execValue.isBlank(); this.content = CONTENT_TEMPLATE.formatted(execValue, this.getClass().getName()); }