fixes a display error where a vault appeared unlocked even when a wrong password was given

This commit is contained in:
infeo
2018-07-09 18:43:45 +02:00
parent b65da30899
commit c289040624
@@ -100,15 +100,18 @@ public class Vault {
}
public synchronized void unlock(CharSequence passphrase) throws CryptoException, IOException, Volume.VolumeException {
Platform.runLater(() -> {
state.set(State.PROCESSING);
});
CryptoFileSystem fs = getCryptoFileSystem(passphrase);
volume = volumeProvider.get();
volume.mount(fs);
Platform.runLater(() -> {
state.set(State.UNLOCKED);
});
Platform.runLater(() -> state.set(State.PROCESSING));
try {
CryptoFileSystem fs = getCryptoFileSystem(passphrase);
volume = volumeProvider.get();
volume.mount(fs);
Platform.runLater(() -> {
state.set(State.UNLOCKED);
});
} catch (Exception e) {
Platform.runLater(() -> state.set(State.LOCKED));
throw e;
}
}
public synchronized void lock(boolean forced) throws Volume.VolumeException {