1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-04 09:33:36 +00:00

sync: Implement --suffix-keep-extension for use with --suffix - fixes #3032

This commit is contained in:
Nick Craig-Wood
2019-03-10 16:50:28 +00:00
parent 3c4407442d
commit 28230d93b4
7 changed files with 73 additions and 9 deletions

View File

@@ -226,7 +226,7 @@ func (s *syncCopyMove) pairChecker(in *pipe, out *pipe, wg *sync.WaitGroup) {
} else {
// If destination already exists, then we must move it into --backup-dir if required
if pair.Dst != nil && s.backupDir != nil {
remoteWithSuffix := pair.Dst.Remote() + s.suffix
remoteWithSuffix := operations.SuffixName(pair.Dst.Remote())
overwritten, _ := s.backupDir.NewObject(remoteWithSuffix)
_, err := operations.Move(s.backupDir, overwritten, remoteWithSuffix, pair.Dst)
if err != nil {