diff --git a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoWritableFile.java b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoWritableFile.java index f303ba75f..eb4fb4626 100644 --- a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoWritableFile.java +++ b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoWritableFile.java @@ -120,7 +120,7 @@ class CryptoWritableFile implements WritableFile { throw new IllegalStateException("Unexpected exception while waiting for encrypted file to be written", e); } } catch (InterruptedException e) { - Thread.currentThread().interrupt(); + throw new UncheckedIOException(new InterruptedIOException("Task interrupted while flushing encrypted content")); } finally { executorService.shutdownNow(); file.close();