Skip to content

Commit ec5f08f

Browse files
committed
Merge branch 'develop' into release/1.5.0
2 parents 37fc8b6 + 91f6839 commit ec5f08f

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@
8787
<version>${junit.version}</version>
8888
<scope>test</scope>
8989
</dependency>
90+
<dependency>
91+
<groupId>org.slf4j</groupId>
92+
<artifactId>slf4j-simple</artifactId>
93+
<version>${slf4j.version}</version>
94+
<scope>test</scope>
95+
</dependency>
9096
</dependencies>
9197

9298
<build>

src/main/java/module-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@
2727

2828
opens org.cryptomator.linux.tray to org.cryptomator.integrations.api;
2929
opens org.cryptomator.linux.quickaccess to org.cryptomator.integrations.api;
30+
opens org.cryptomator.linux.autostart to org.cryptomator.integrations.api;
3031
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public FreedesktopAutoStartService() {
4949
LOG.debug("JVM property {} not set, using command path", CMD_PROPERTY);
5050
execValue = ProcessHandle.current().info().command().orElse("");
5151
}
52-
this.hasExecValue = execValue.isBlank();
52+
this.hasExecValue = !execValue.isBlank();
5353
this.content = CONTENT_TEMPLATE.formatted(execValue, this.getClass().getName());
5454
}
5555

src/test/java/org/cryptomator/linux/autostart/FreedesktopAutoStartIT.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
package org.cryptomator.linux.autostart;
22

3+
import org.cryptomator.integrations.autostart.AutoStartProvider;
4+
import org.cryptomator.integrations.common.IntegrationsLoader;
5+
import org.cryptomator.integrations.quickaccess.QuickAccessService;
6+
import org.cryptomator.linux.quickaccess.DolphinPlaces;
37
import org.junit.jupiter.api.Assertions;
8+
import org.junit.jupiter.api.Disabled;
9+
import org.junit.jupiter.api.DisplayName;
410
import org.junit.jupiter.api.MethodOrderer;
511
import org.junit.jupiter.api.Order;
612
import org.junit.jupiter.api.Test;
@@ -11,6 +17,16 @@ public class FreedesktopAutoStartIT {
1117

1218
FreedesktopAutoStartService inTest = new FreedesktopAutoStartService();
1319

20+
@Test
21+
@DisplayName("If freedesktop dirs are present, isSupported returns true and service is contained in the service provider stream")
22+
@Disabled
23+
public void testSupport() {
24+
Assertions.assertTrue(inTest.isSupported());
25+
26+
var optionalService = IntegrationsLoader.loadAll(AutoStartProvider.class).filter(s -> s.getClass().getName().equals("org.cryptomator.linux.autostart.FreedesktopAutoStartService")).findAny();
27+
Assertions.assertTrue(optionalService.isPresent());
28+
}
29+
1430
@Test
1531
@Order(1)
1632
public void testAutostartEnable() {

0 commit comments

Comments
 (0)