mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-19 03:01:27 +00:00
Make delegating folders create their parents during own creation if they don't exist yet.
This commit is contained in:
@@ -63,6 +63,10 @@ public abstract class DelegatingFolder<R extends DelegatingReadableFile, W exten
|
||||
|
||||
@Override
|
||||
public void create() throws UncheckedIOException {
|
||||
if (exists()) {
|
||||
return;
|
||||
}
|
||||
parent().ifPresent(p -> p.create());
|
||||
delegate.create();
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ public class CryptoFileSystem extends CryptoFolder implements FileSystem {
|
||||
|
||||
@Override
|
||||
public boolean exists() {
|
||||
return physicalRoot.exists();
|
||||
return physicalFile().exists() && physicalFolder().exists();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user