mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-09-19 06:32:12 +00:00
fixed webdav copy/move [ci skip]
This commit is contained in:
-4
@@ -71,10 +71,6 @@ class InMemoryFile extends InMemoryNode implements File {
|
||||
this.lastModified = lastModified;
|
||||
}
|
||||
|
||||
private void setCreationTime(Instant creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
private ByteBuffer getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
+4
-9
@@ -10,15 +10,15 @@ package org.cryptomator.filesystem.inmem;
|
||||
|
||||
import static java.lang.String.format;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.nio.file.FileAlreadyExistsException;
|
||||
import java.time.Instant;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.commons.io.FileExistsException;
|
||||
import org.cryptomator.common.WeakValuedCache;
|
||||
import org.cryptomator.filesystem.Folder;
|
||||
|
||||
@@ -38,7 +38,7 @@ class InMemoryFolder extends InMemoryNode implements Folder {
|
||||
if (exists()) {
|
||||
return existingChildren.values().stream();
|
||||
} else {
|
||||
throw new UncheckedIOException(new IOException(format("Folder %s does not exist", this)));
|
||||
throw new UncheckedIOException(new FileNotFoundException(format("Folder %s does not exist", this)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ class InMemoryFolder extends InMemoryNode implements Folder {
|
||||
parent.existingChildren.compute(name, (k, v) -> {
|
||||
if (v != null) {
|
||||
// other file or folder with same name already exists.
|
||||
throw new UncheckedIOException(new FileExistsException(k));
|
||||
throw new UncheckedIOException(new FileAlreadyExistsException(k));
|
||||
} else {
|
||||
this.lastModified = Instant.now();
|
||||
return this;
|
||||
@@ -113,11 +113,6 @@ class InMemoryFolder extends InMemoryNode implements Folder {
|
||||
assert!this.exists();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCreationTime(Instant instant) throws UncheckedIOException {
|
||||
creationTime = instant;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return parent.toString() + name + "/";
|
||||
|
||||
+5
@@ -83,4 +83,9 @@ class InMemoryNode implements Node {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCreationTime(Instant creationTime) throws UncheckedIOException {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user