Skip to content

Commit 22be841

Browse files
committed
Merge branch 'develop' of https://github.com/cryptomator/integrations-linux into develop
2 parents 408cf0a + 3dfbc3f commit 22be841

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,17 @@ public class KDEWalletKeychainAccess implements KeychainAccessProvider {
2424
public KDEWalletKeychainAccess() {
2525
ConnectedWallet wallet = null;
2626
try {
27-
DBusConnection conn = DBusConnection.getConnection(DBusConnection.DBusBusType.SESSION);
27+
DBusConnection conn = null;
28+
try {
29+
conn = DBusConnection.getConnection(DBusConnection.DBusBusType.SESSION);
30+
} catch (RuntimeException e) {
31+
if (e.getMessage() == "Cannot Resolve Session Bus Address") {
32+
LOG.warn("SESSION DBus not found.");
33+
}
34+
}
35+
if (conn == null) {
36+
conn = DBusConnection.getConnection(DBusConnection.DBusBusType.SYSTEM);
37+
}
2838
wallet = new ConnectedWallet(conn);
2939
} catch (DBusException e) {
3040
LOG.warn("Connecting to D-Bus failed.", e);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public boolean isSupported() {
1818
try (@SuppressWarnings("unused") SimpleCollection keyring = new SimpleCollection()) {
1919
// seems like we're able to access the keyring.
2020
return true;
21-
} catch (IOException | RuntimeException e) {
21+
} catch (IOException | ExceptionInInitializerError | RuntimeException e) {
2222
return false;
2323
}
2424
}

0 commit comments

Comments
 (0)