copy/sync/move: add --create-empty-src-dirs flag - fixes #2869

This commit is contained in:
ishuah 2019-03-06 11:43:46 +03:00 committed by Nick Craig-Wood
parent 2078ad68a5
commit 1b52f8d2a5
8 changed files with 149 additions and 77 deletions

View file

@ -48,7 +48,7 @@ destination.
fsrc, srcFileName, fdst, dstFileName := cmd.NewFsSrcDstFiles(args)
cmd.Run(true, true, command, func() error {
if srcFileName == "" {
return sync.CopyDir(fdst, fsrc)
return sync.CopyDir(fdst, fsrc, false)
}
return operations.CopyFile(fdst, fsrc, dstFileName, srcFileName)
})