mirror of
https://github.com/rclone/rclone.git
synced 2026-01-08 03:23:26 +00:00
feat: add multiple paths support to --compare-dest and --copy-dest flag
This commit is contained in:
@@ -70,7 +70,7 @@ type syncCopyMove struct {
|
||||
trackRenamesWg sync.WaitGroup // wg for background track renames
|
||||
trackRenamesCh chan fs.Object // objects are pumped in here
|
||||
renameCheck []fs.Object // accumulate files to check for rename here
|
||||
compareCopyDest fs.Fs // place to check for files to server-side copy
|
||||
compareCopyDest []fs.Fs // place to check for files to server side copy
|
||||
backupDir fs.Fs // place to store overwrites/deletes
|
||||
checkFirst bool // if set run all the checkers before starting transfers
|
||||
}
|
||||
@@ -212,13 +212,13 @@ func newSyncCopyMove(ctx context.Context, fdst, fsrc fs.Fs, deleteMode fs.Delete
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if ci.CompareDest != "" {
|
||||
if len(ci.CompareDest) > 0 {
|
||||
var err error
|
||||
s.compareCopyDest, err = operations.GetCompareDest(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else if ci.CopyDest != "" {
|
||||
} else if len(ci.CopyDest) > 0 {
|
||||
var err error
|
||||
s.compareCopyDest, err = operations.GetCopyDest(ctx, fdst)
|
||||
if err != nil {
|
||||
@@ -890,7 +890,7 @@ func (s *syncCopyMove) run() error {
|
||||
// Delete empty fsrc subdirectories
|
||||
// if DoMove and --delete-empty-src-dirs flag is set
|
||||
if s.DoMove && s.deleteEmptySrcDirs {
|
||||
//delete empty subdirectories that were part of the move
|
||||
// delete empty subdirectories that were part of the move
|
||||
s.processError(s.deleteEmptyDirectories(s.ctx, s.fsrc, s.srcEmptyDirs))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user