Caused by: java.nio.file.NoSuchFileException: C:\work\vault\d\KG\6TFDGKXGZEGWRZOGTDFDF4YEGAZO6Q\LXBV6TKI3yH3CMtJLyAcHkOOcMcMeBuT.c9r
at com.google.common.jimfs.DirectoryEntry.requireExists(DirectoryEntry.java:66)
at com.google.common.jimfs.FileSystemView$1.lookup(FileSystemView.java:708)
at com.google.common.jimfs.AbstractAttributeView.lookupFile(AbstractAttributeView.java:39)
at com.google.common.jimfs.BasicAttributeProvider$View.setTimes(BasicAttributeProvider.java:155)
at org.cryptomator.cryptofs@2.7.0-SNAPSHOT/org.cryptomator.cryptofs.ch.CleartextFileChannel.persistLastModified(CleartextFileChannel.java:250)
at org.cryptomator.cryptofs@2.7.0-SNAPSHOT/org.cryptomator.cryptofs.ch.CleartextFileChannel.implCloseChannel(CleartextFileChannel.java:321)
at java.base/java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:112)
at org.cryptomator.cryptofs@2.7.0-SNAPSHOT/org.cryptomator.cryptofs.CryptoFileChannelWriteReadIntegrationTest$PlatformIndependent.lambda$testClosingChannelOfDeletedFile$4(CryptoFileChannelWriteReadIntegrationTest.java:580)
at org.junit.jupiter.api.AssertDoesNotThrow.assertDoesNotThrow(AssertDoesNotThrow.java:49)
... 83 more
The reason is, that we set the last modified date explicitly when closing the file channel (due to caching of chunks, otherwise last modified might set to the time when closing the channel and flush the chunk cache).
Default OS filesystems behave differently, by just closing the channel without any exception.
Consider the following test:
It fails with
The reason is, that we set the last modified date explicitly when closing the file channel (due to caching of chunks, otherwise last modified might set to the time when closing the channel and flush the chunk cache).
Default OS filesystems behave differently, by just closing the channel without any exception.