mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-18 10:41:26 +00:00
don't attempt to access linux keychain on non-linux systems, even if classes are present (i.e. when starting from IDE)
[ci skip]
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
package org.cryptomator.keychain;
|
||||
|
||||
import org.apache.commons.lang3.SystemUtils;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class LinuxKeychainTester {
|
||||
|
||||
public static boolean secretServiceIsAvailable() {
|
||||
try {
|
||||
Class.forName("org.freedesktop.secret.simple.SimpleCollection");
|
||||
return true;
|
||||
return SystemUtils.IS_OS_LINUX; // even if the classes could be loaded, secretService is only available on linux
|
||||
} catch (ClassNotFoundException e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user