Skip to content

Commit 33b378d

Browse files
committed
Simplify CheckAvailabillity method for quickAccess
* only check for files * circumvent flatpak need of spawning host processes
1 parent a2c0353 commit 33b378d

File tree

3 files changed

+2
-27
lines changed

3 files changed

+2
-27
lines changed

src/main/java/org/cryptomator/linux/quickaccess/DolphinPlaces.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import org.cryptomator.integrations.common.Priority;
77
import org.cryptomator.integrations.quickaccess.QuickAccessService;
88
import org.cryptomator.integrations.quickaccess.QuickAccessServiceException;
9-
import org.cryptomator.linux.util.SupportUtil;
109
import org.xml.sax.SAXException;
1110

1211
import javax.xml.XMLConstants;
@@ -23,7 +22,6 @@
2322
import java.nio.file.StandardOpenOption;
2423
import java.util.List;
2524
import java.util.UUID;
26-
import java.util.concurrent.TimeUnit;
2725
import java.util.concurrent.locks.Lock;
2826
import java.util.concurrent.locks.ReentrantLock;
2927

@@ -161,6 +159,6 @@ private int indexOfEntryOpeningTag(String placesContent, int idIndex) {
161159

162160
@CheckAvailability
163161
public static boolean isSupported() {
164-
return SupportUtil.commandExists("dolphin");
162+
return Files.exists(PLACES_FILE);
165163
}
166164
}

src/main/java/org/cryptomator/linux/quickaccess/NautilusBookmarks.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@
66
import org.cryptomator.integrations.common.Priority;
77
import org.cryptomator.integrations.quickaccess.QuickAccessService;
88
import org.cryptomator.integrations.quickaccess.QuickAccessServiceException;
9-
import org.cryptomator.linux.util.SupportUtil;
109

1110
import java.io.IOException;
1211
import java.nio.charset.StandardCharsets;
1312
import java.nio.file.Files;
1413
import java.nio.file.Path;
1514
import java.nio.file.StandardCopyOption;
1615
import java.nio.file.StandardOpenOption;
17-
import java.util.concurrent.TimeUnit;
1816
import java.util.concurrent.locks.Lock;
1917
import java.util.concurrent.locks.ReentrantReadWriteLock;
2018

@@ -85,6 +83,6 @@ public void remove() throws QuickAccessServiceException {
8583

8684
@CheckAvailability
8785
public static boolean isSupported() {
88-
return SupportUtil.commandExists("nautilus");
86+
return Files.exists(BOOKMARKS_FILE);
8987
}
9088
}

src/main/java/org/cryptomator/linux/util/SupportUtil.java

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)