mirror of
https://github.com/rclone/rclone
synced 2024-11-21 22:50:16 +01:00
dropbox: fix missing encoding for rclone purge
This was causing directories with encodable characters in not to be found on purge. See: https://forum.rclone.org/t/purge-command-does-not-work-on-directories-with-files/42793
This commit is contained in:
parent
94b7c49196
commit
33376bf399
@ -946,6 +946,7 @@ func (f *Fs) purgeCheck(ctx context.Context, dir string, check bool) (err error)
|
||||
if root == "/" {
|
||||
return errors.New("can't remove root directory")
|
||||
}
|
||||
root = f.opt.Enc.FromStandardPath(root)
|
||||
|
||||
if check {
|
||||
// check directory exists
|
||||
@ -954,7 +955,6 @@ func (f *Fs) purgeCheck(ctx context.Context, dir string, check bool) (err error)
|
||||
return fmt.Errorf("Rmdir: %w", err)
|
||||
}
|
||||
|
||||
root = f.opt.Enc.FromStandardPath(root)
|
||||
// check directory empty
|
||||
arg := files.ListFolderArg{
|
||||
Path: root,
|
||||
|
Loading…
Reference in New Issue
Block a user