Explorar o código

fixes #163

* coverity issue 72253
Markus Kreusch %!s(int64=9) %!d(string=hai) anos
pai
achega
6d31ed7ea4

+ 2 - 1
main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/BlockAlignedWritableFile.java

@@ -111,7 +111,8 @@ class BlockAlignedWritableFile implements WritableFile {
 		currentBlockBuffer.clear();
 		try (ReadableFile r = openReadable.get()) {
 			r.position(physicalPosition);
-			r.read(currentBlockBuffer);
+			int numRead = r.read(currentBlockBuffer);
+			assert numRead == currentBlockBuffer.position();
 		}
 		int advance = (int) (logicalPosition - physicalPosition);
 		currentBlockBuffer.position(advance);