Don't make directories if --dry-run set - fixes #342
This commit is contained in:
parent
b279df2e67
commit
3343c1afa4
1 changed files with 5 additions and 2 deletions
|
@ -448,9 +448,8 @@ func syncCopyMove(fdst, fsrc Fs, Delete bool, DoMove bool) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
err := fdst.Mkdir()
|
err := Mkdir(fdst)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Stats.Error()
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -852,6 +851,10 @@ func ListDir(f Fs, w io.Writer) error {
|
||||||
|
|
||||||
// Mkdir makes a destination directory or container
|
// Mkdir makes a destination directory or container
|
||||||
func Mkdir(f Fs) error {
|
func Mkdir(f Fs) error {
|
||||||
|
if Config.DryRun {
|
||||||
|
Log(f, "Not making directory as dry run is set")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
err := f.Mkdir()
|
err := f.Mkdir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Stats.Error()
|
Stats.Error()
|
||||||
|
|
Loading…
Reference in a new issue