Merge pull request #4274 from cryptomator/feature/4272-fix-locate-encrypted

Feature: Fix locate encrypted file on Linux
This commit is contained in:
Armin Schrenk
2026-07-17 17:51:53 +02:00
committed by GitHub
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -38,7 +38,7 @@
<cryptomator.integrations.version>1.9.0</cryptomator.integrations.version>
<cryptomator.integrations.win.version>1.6.1</cryptomator.integrations.win.version>
<cryptomator.integrations.mac.version>1.5.0</cryptomator.integrations.mac.version>
<cryptomator.integrations.linux.version>1.7.0</cryptomator.integrations.linux.version>
<cryptomator.integrations.linux.version>1.8.0-beta1</cryptomator.integrations.linux.version>
<cryptomator.fuse.version>6.0.1</cryptomator.fuse.version>
<cryptomator.webdav.version>3.0.2</cryptomator.webdav.version>
<cryptomator.webdav-servlet.version>1.2.12</cryptomator.webdav-servlet.version>
@@ -6,6 +6,7 @@ import org.cryptomator.integrations.common.Priority;
import org.cryptomator.integrations.revealpath.RevealFailedException;
import org.cryptomator.integrations.revealpath.RevealPathService;
import java.nio.file.Files;
import java.nio.file.Path;
/**
@@ -17,14 +18,17 @@ import java.nio.file.Path;
*/
@DisplayName("JavaFX HostServices (GTK)")
@OperatingSystem(OperatingSystem.Value.LINUX)
@Priority(10)
@Priority(Priority.FALLBACK)
public class JfxRevealPathService implements RevealPathService {
@Override
public void reveal(Path p) throws RevealFailedException {
var absPath = p.toAbsolutePath();
var fxApp = FxApplication.INSTANCE.get();
if (fxApp != null) {
fxApp.getHostServices().showDocument(p.toUri().toString());
// showDocument() launches the default app for a regular file, so reveal its parent directory instead
var target = Files.isRegularFile(absPath) ? absPath.getParent() : absPath;
fxApp.getHostServices().showDocument(target.toUri().toString());
} else {
throw new RevealFailedException("JavaFX Application not initialized");
}