Remove vault reference for target.

This commit is contained in:
David Kocher
2025-08-05 11:23:24 +02:00
parent 6b993bab81
commit 4943ea6d2e
6 changed files with 11 additions and 6 deletions
@@ -17,6 +17,7 @@ package ch.cyberduck.core.brick;
import ch.cyberduck.core.ConnectionCallback;
import ch.cyberduck.core.Path;
import ch.cyberduck.core.PathAttributes;
import ch.cyberduck.core.brick.io.swagger.client.ApiException;
import ch.cyberduck.core.brick.io.swagger.client.api.FileActionsApi;
import ch.cyberduck.core.brick.io.swagger.client.model.CopyPathBody;
@@ -61,7 +62,7 @@ public class BrickCopyFeature extends BrickFileMigrationFeature implements Copy
if(entity.getFileMigrationId() != null) {
this.poll(client, entity);
}
return new Path(target).withAttributes(file.attributes());
return new Path(target).withAttributes(new PathAttributes(file.attributes()).setVault(null));
}
catch(ApiException e) {
throw new BrickExceptionMappingService().map("Cannot copy {0}", e, file);
@@ -18,6 +18,7 @@ package ch.cyberduck.core.brick;
import ch.cyberduck.core.CaseInsensitivePathPredicate;
import ch.cyberduck.core.ConnectionCallback;
import ch.cyberduck.core.Path;
import ch.cyberduck.core.PathAttributes;
import ch.cyberduck.core.brick.io.swagger.client.ApiException;
import ch.cyberduck.core.brick.io.swagger.client.api.FileActionsApi;
import ch.cyberduck.core.brick.io.swagger.client.model.FileActionEntity;
@@ -59,7 +60,7 @@ public class BrickMoveFeature extends BrickFileMigrationFeature implements Move
if(entity.getFileMigrationId() != null) {
this.poll(client, entity);
}
return new Path(target).withAttributes(file.attributes());
return new Path(target).withAttributes(new PathAttributes(file.attributes()).setVault(null));
}
catch(ApiException e) {
throw new BrickExceptionMappingService().map("Cannot rename {0}", e, file);
@@ -20,6 +20,7 @@ package ch.cyberduck.core.ftp;
import ch.cyberduck.core.ConnectionCallback;
import ch.cyberduck.core.Path;
import ch.cyberduck.core.PathAttributes;
import ch.cyberduck.core.exception.BackgroundException;
import ch.cyberduck.core.features.Delete;
import ch.cyberduck.core.features.Move;
@@ -50,7 +51,7 @@ public class FTPMoveFeature implements Move {
throw new FTPException(session.getClient().getReplyCode(), session.getClient().getReplyString());
}
// Copy original file attributes
return new Path(renamed).withAttributes(file.attributes());
return new Path(renamed).withAttributes(new PathAttributes(file.attributes()).setVault(null));
}
catch(IOException e) {
throw new FTPExceptionMappingService().map("Cannot rename {0}", e, file);
@@ -19,6 +19,7 @@ import ch.cyberduck.core.ConnectionCallback;
import ch.cyberduck.core.DefaultIOExceptionMappingService;
import ch.cyberduck.core.LocaleFactory;
import ch.cyberduck.core.Path;
import ch.cyberduck.core.PathAttributes;
import ch.cyberduck.core.exception.AccessDeniedException;
import ch.cyberduck.core.exception.BackgroundException;
import ch.cyberduck.core.features.Delete;
@@ -47,7 +48,7 @@ public class MantaMoveFeature implements Move {
try {
session.getClient().move(file.getAbsolute(), renamed.getAbsolute());
// Copy original file attributes
return new Path(renamed).withAttributes(file.attributes());
return new Path(renamed).withAttributes(new PathAttributes(file.attributes()).setVault(null));
}
catch(MantaException e) {
throw new MantaExceptionMappingService().map("Cannot rename {0}", e, file);
@@ -19,6 +19,7 @@ package ch.cyberduck.core.sftp;
import ch.cyberduck.core.ConnectionCallback;
import ch.cyberduck.core.Path;
import ch.cyberduck.core.PathAttributes;
import ch.cyberduck.core.exception.BackgroundException;
import ch.cyberduck.core.features.Delete;
import ch.cyberduck.core.features.Move;
@@ -46,7 +47,7 @@ public class SFTPMoveFeature implements Move {
session.sftp().rename(file.getAbsolute(), renamed.getAbsolute(),
status.isExists() ? new HashSet<>(Arrays.asList(RenameFlags.OVERWRITE, RenameFlags.NATIVE)) : Collections.singleton(RenameFlags.NATIVE));
// Copy original file attributes
return new Path(renamed).withAttributes(file.attributes());
return new Path(renamed).withAttributes(new PathAttributes(file.attributes()).setVault(null));
}
catch(IOException e) {
throw new SFTPExceptionMappingService().map("Cannot rename {0}", e, file);
@@ -62,7 +62,7 @@ public class DAVMoveFeature implements Move {
status.isExists());
}
// Copy original file attributes
return new Path(renamed).withAttributes(new PathAttributes(file.attributes()).setLockId(null));
return new Path(renamed).withAttributes(new PathAttributes(file.attributes()).setVault(null).setLockId(null));
}
catch(SardineException e) {
throw new DAVExceptionMappingService().map("Cannot rename {0}", e, file);