Skip to content

Commit 894e1dd

Browse files
1 parent 0dc0230 commit 894e1dd

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/main/java/org/cryptomator/linux/keychain/KDEWalletKeychainAccess.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,22 @@ private static DBusConnection getNewConnection() throws DBusException {
9797
}
9898

9999
public boolean isSupported() {
100-
return wallet.isEnabled();
100+
try {
101+
return wallet.isEnabled();
102+
} catch (RuntimeException e) {
103+
LOG.warn("Failed to check if KDE Wallet is available.", e);
104+
return false;
105+
}
101106
}
102107

103-
public boolean isLocked() { return !wallet.isOpen(Static.DEFAULT_WALLET); }
108+
public boolean isLocked() {
109+
try {
110+
return !wallet.isOpen(Static.DEFAULT_WALLET);
111+
} catch (RuntimeException e) {
112+
LOG.warn("Failed to check whether KDE Wallet is open, therefore considering it closed.", e);
113+
return true;
114+
}
115+
}
104116

105117
public void storePassphrase(String key, CharSequence passphrase) throws KeychainAccessException {
106118
try {

0 commit comments

Comments
 (0)