Skip to content

Commit

Permalink
Simplify CheckAvailabillity method for quickAccess
Browse files Browse the repository at this point in the history
* only check for files
* circumvent flatpak need of spawning host processes
  • Loading branch information
infeo committed Aug 23, 2024
1 parent a2c0353 commit 33b378d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.cryptomator.integrations.common.Priority;
import org.cryptomator.integrations.quickaccess.QuickAccessService;
import org.cryptomator.integrations.quickaccess.QuickAccessServiceException;
import org.cryptomator.linux.util.SupportUtil;
import org.xml.sax.SAXException;

import javax.xml.XMLConstants;
Expand All @@ -23,7 +22,6 @@
import java.nio.file.StandardOpenOption;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

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

@CheckAvailability
public static boolean isSupported() {
return SupportUtil.commandExists("dolphin");
return Files.exists(PLACES_FILE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
import org.cryptomator.integrations.common.Priority;
import org.cryptomator.integrations.quickaccess.QuickAccessService;
import org.cryptomator.integrations.quickaccess.QuickAccessServiceException;
import org.cryptomator.linux.util.SupportUtil;

import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
import java.nio.file.StandardOpenOption;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

Expand Down Expand Up @@ -85,6 +83,6 @@ public void remove() throws QuickAccessServiceException {

@CheckAvailability
public static boolean isSupported() {
return SupportUtil.commandExists("nautilus");
return Files.exists(BOOKMARKS_FILE);
}
}
21 changes: 0 additions & 21 deletions src/main/java/org/cryptomator/linux/util/SupportUtil.java

This file was deleted.

0 comments on commit 33b378d

Please sign in to comment.