mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-20 11:41:26 +00:00
rely on the cache directly after unlock and inject in the cache on keychain changes
This commit is contained in:
@@ -101,7 +101,7 @@ public class KeychainManager implements KeychainAccessProvider {
|
||||
}
|
||||
|
||||
private void setPassphraseStored(String key, boolean value) {
|
||||
BooleanProperty property = passphraseStoredProperties.getIfPresent(key);
|
||||
BooleanProperty property = passphraseStoredProperties.get(key, _ -> new SimpleBooleanProperty(value));
|
||||
if (property != null) {
|
||||
if (Platform.isFxApplicationThread()) {
|
||||
property.set(value);
|
||||
|
||||
@@ -113,7 +113,7 @@ public class MasterkeyFileLoadingStrategy implements KeyLoadingStrategy {
|
||||
|
||||
private void savePasswordToSystemkeychain(Passphrase passphrase) {
|
||||
try {
|
||||
if (keychain.isSupported() && !keychain.isPassphraseStored(vault.getId())) {
|
||||
if (keychain.isSupported() && !keychain.getPassphraseStoredProperty(vault.getId()).getValue()) {
|
||||
keychain.storePassphrase(vault.getId(), vault.getDisplayName(), passphrase);
|
||||
}
|
||||
} catch (KeychainAccessException e) {
|
||||
|
||||
Reference in New Issue
Block a user