Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import io.milton.http.LockToken;
import io.milton.http.Request;
import io.milton.http.Response;
import io.milton.http.exceptions.BadRequestException;
import io.milton.http.exceptions.ConflictException;
import io.milton.http.exceptions.NotAuthorizedException;
import io.milton.property.PropertySource;
Expand Down Expand Up @@ -115,7 +116,7 @@ public int compareTo(DcacheResource that) {

@Override
public void moveTo(CollectionResource newParent, String name)
throws ConflictException {
throws ConflictException, NotAuthorizedException, BadRequestException {
if (!(newParent instanceof DcacheDirectoryResource)) {
throw new RuntimeException(
"Destination is an unknown type. Must be a DcacheDirectoryResource, is a: "
Expand All @@ -128,8 +129,10 @@ public void moveTo(CollectionResource newParent, String name)
FsPath newPath = directory._path.child(name);
_factory.move(_path, _attributes.getPnfsId(), newPath);
_path = newPath;
} catch (PermissionDeniedCacheException e) {
throw WebDavExceptions.permissionDenied(this);
} catch (CacheException e) {
throw new RuntimeException(e);
throw new WebDavException(e.getMessage(), e, this);
}
}

Expand Down