mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-10-22 14:22:39 +00:00
Restore the mount point of a vault whose mount fails to close by running the special cleanup in release()'s finally
This commit is contained in:
@@ -237,11 +237,11 @@ public class Vault {
|
||||
private void release(Mounter.MountHandle mountHandle) throws UnmountFailedException, IOException {
|
||||
try {
|
||||
mountHandle.mountObj().close();
|
||||
mountHandle.specialCleanup().run();
|
||||
} finally {
|
||||
removeFromQuickAccess();
|
||||
destroyCryptoFileSystem();
|
||||
this.mountHandle.set(null);
|
||||
mountHandle.specialCleanup().run();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -160,6 +160,7 @@ class VaultTest {
|
||||
vault.lock(false);
|
||||
|
||||
Mockito.verify(mount).unmount();
|
||||
Mockito.verify(specialCleanup).run();
|
||||
Mockito.verify(cryptoFileSystem).close();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user