Skip to content

Commit 6bcf079

Browse files
committed
cleanup
1 parent fbf3013 commit 6bcf079

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/main/java/org/cryptomator/cryptofs/CryptoFileSystemModule.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
import org.cryptomator.cryptofs.attr.AttributeViewComponent;
1212
import org.cryptomator.cryptofs.dir.DirectoryStreamComponent;
1313
import org.cryptomator.cryptofs.event.FilesystemEvent;
14-
import org.cryptomator.cryptofs.inuse.StubInUseManager;
15-
import org.cryptomator.cryptofs.inuse.InUseManager;
1614
import org.cryptomator.cryptofs.fh.OpenCryptoFileComponent;
15+
import org.cryptomator.cryptofs.inuse.InUseManager;
1716
import org.cryptomator.cryptofs.inuse.RealInUseManager;
17+
import org.cryptomator.cryptofs.inuse.StubInUseManager;
1818
import org.cryptomator.cryptolib.api.Cryptor;
1919
import org.slf4j.Logger;
2020
import org.slf4j.LoggerFactory;
@@ -59,8 +59,8 @@ public Consumer<FilesystemEvent> provideFilesystemEventConsumer(CryptoFileSystem
5959
@Provides
6060
@CryptoFileSystemScoped
6161
public InUseManager provideInUseManager(CryptoFileSystemProperties fsProps, Cryptor cryptor) {
62-
var owner = Objects.requireNonNullElse(fsProps.owner(),"");
63-
if(!owner.isBlank() && !fsProps.readonly()) {
62+
var owner = Objects.requireNonNullElse(fsProps.owner(), "");
63+
if (!owner.isBlank() && !fsProps.readonly()) {
6464
return new RealInUseManager(owner, cryptor);
6565
} else {
6666
return new StubInUseManager();

src/main/java/org/cryptomator/cryptofs/inuse/RealUseToken.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void moveToInternal(Path newFilePath) {
191191
useTokens.compute(newFilePath, (_, _) -> {
192192
try {
193193
if (channel != null) {
194-
//TODO: does this affect the lastModified file?
194+
//normally, moving a file retains lastModified. If not, the file will fail the refresh test and will be closed.
195195
Files.move(filePath, newFilePath, StandardCopyOption.REPLACE_EXISTING);
196196
}
197197
return this;

src/main/java/org/cryptomator/cryptofs/inuse/UseToken.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ default boolean isClosed() {
1414
return false;
1515
}
1616

17+
@Override
1718
default void close() {}
1819

1920
record InitToken() implements UseToken {}

0 commit comments

Comments
 (0)