mirror of
https://github.com/rclone/rclone.git
synced 2025-01-10 16:28:30 +01:00
rclone: Don't purge if --dry-run set
This commit is contained in:
parent
e055ed0489
commit
eb2b4ea8aa
@ -475,10 +475,14 @@ func Rmdir(f Fs) error {
|
||||
// FIXME doesn't delete local directories
|
||||
func Purge(f Fs) error {
|
||||
if purger, ok := f.(Purger); ok {
|
||||
err := purger.Purge()
|
||||
if err != nil {
|
||||
Stats.Error()
|
||||
return err
|
||||
if Config.DryRun {
|
||||
Debug(f, "Not purging as --dry-run set")
|
||||
} else {
|
||||
err := purger.Purge()
|
||||
if err != nil {
|
||||
Stats.Error()
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
DeleteFiles(f.List())
|
||||
|
Loading…
Reference in New Issue
Block a user