Ver código fonte

Handle further queries of the backend for disabled keyrings

Ralph Plawetzki 2 anos atrás
pai
commit
b34bf6f161

+ 2 - 0
src/main/java/org/cryptomator/common/keychain/KeychainManager.java

@@ -93,6 +93,8 @@ public class KeychainManager implements KeychainAccessProvider {
 	 * @throws KeychainAccessException
 	 */
 	public boolean isPassphraseStored(String key) throws KeychainAccessException {
+		// check if keyrings are disabled; in this case we don't need to ask the backend
+		if (settings.disableAllKeyrings().get()) return false;
 		char[] storedPw = null;
 		try {
 			storedPw = getKeychainOrFail().loadPassphrase(key);