Skip to content

Commit a2c0353

Browse files
committed
only support freedesktop autostart, if autostartCmd property is explicitly set
1 parent e298ba5 commit a2c0353

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/main/java/org/cryptomator/linux/autostart/FreedesktopAutoStartService.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ public FreedesktopAutoStartService() {
4444
var xdgConfigDirString = Objects.requireNonNullElse(System.getenv("XDG_CONFIG_HOME"), System.getProperty("user.home") + "/.config");
4545
this.autostartFile = Path.of(xdgConfigDirString, "autostart", AUTOSTART_FILENAME);
4646

47-
var execValue = System.getProperty(CMD_PROPERTY);
48-
if (execValue == null) {
49-
LOG.debug("JVM property {} not set, using command path", CMD_PROPERTY);
50-
execValue = ProcessHandle.current().info().command().orElse("");
51-
}
47+
var execValue = System.getProperty(CMD_PROPERTY,"");
5248
this.hasExecValue = !execValue.isBlank();
5349
this.content = CONTENT_TEMPLATE.formatted(execValue, this.getClass().getName());
5450
}

0 commit comments

Comments
 (0)