mirror of
https://github.com/rclone/rclone.git
synced 2024-12-22 15:11:56 +01:00
quatrix: overwrite files on conflict during server-side move
This commit is contained in:
parent
41a52f50df
commit
6b60e09ff2
@ -6,8 +6,8 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// OverwriteOnCopyMode is a conflict resolve mode during copy. Files with conflicting names will be overwritten
|
||||
const OverwriteOnCopyMode = "overwrite"
|
||||
// OverwriteMode is a conflict resolve mode during copy or move. Files with conflicting names will be overwritten
|
||||
const OverwriteMode = "overwrite"
|
||||
|
||||
// ProfileInfo is a profile info about quota
|
||||
type ProfileInfo struct {
|
||||
|
@ -729,7 +729,7 @@ func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object,
|
||||
Resolve: true,
|
||||
MTime: api.JSONTime(srcObj.ModTime(ctx)),
|
||||
Name: dstLeaf,
|
||||
ResolveMode: api.OverwriteOnCopyMode,
|
||||
ResolveMode: api.OverwriteMode,
|
||||
}
|
||||
|
||||
result := &api.File{}
|
||||
@ -789,11 +789,12 @@ func (f *Fs) Move(ctx context.Context, src fs.Object, remote string) (fs.Object,
|
||||
}
|
||||
|
||||
params := &api.FileCopyMoveOneParams{
|
||||
ID: srcObj.id,
|
||||
Target: directoryID,
|
||||
Resolve: false,
|
||||
MTime: api.JSONTime(srcObj.ModTime(ctx)),
|
||||
Name: dstLeaf,
|
||||
ID: srcObj.id,
|
||||
Target: directoryID,
|
||||
Resolve: true,
|
||||
MTime: api.JSONTime(srcObj.ModTime(ctx)),
|
||||
Name: dstLeaf,
|
||||
ResolveMode: api.OverwriteMode,
|
||||
}
|
||||
|
||||
var resp *http.Response
|
||||
|
Loading…
Reference in New Issue
Block a user