File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
src/main/java/org/cryptomator/linux/keychain Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,15 @@ public class KDEWalletKeychainAccess implements KeychainAccessProvider {
24
24
public KDEWalletKeychainAccess () {
25
25
ConnectedWallet wallet = null ;
26
26
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
+ LOG .warn ("SESSION DBus not found." , e );
32
+ }
33
+ if (conn == null ){
34
+ conn = DBusConnection .getConnection (DBusConnection .DBusBusType .SYSTEM );
35
+ }
28
36
wallet = new ConnectedWallet (conn );
29
37
} catch (DBusException e ) {
30
38
LOG .warn ("Connecting to D-Bus failed." , e );
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public boolean isSupported() {
18
18
try (@ SuppressWarnings ("unused" ) SimpleCollection keyring = new SimpleCollection ()) {
19
19
// seems like we're able to access the keyring.
20
20
return true ;
21
- } catch (IOException | RuntimeException e ) {
21
+ } catch (IOException | ExceptionInInitializerError | RuntimeException e ) {
22
22
return false ;
23
23
}
24
24
}
You can’t perform that action at this time.
0 commit comments