mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-09-19 22:44:32 +00:00
fixed writing short ciphertext to file, that existed with a longer ciphertext before but wasn't truncated
This commit is contained in:
+1
@@ -73,6 +73,7 @@ class DavFolder extends DavNode<FolderLocator> {
|
||||
|
||||
private void addMemberFile(DavFile memberFile, InputStream inputStream) {
|
||||
try (ReadableByteChannel src = Channels.newChannel(inputStream); WritableFile dst = node.file(memberFile.getDisplayName()).openWritable()) {
|
||||
dst.truncate();
|
||||
ByteStreams.copy(src, dst);
|
||||
} catch (IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
|
||||
Reference in New Issue
Block a user