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:
Nick Craig-Wood 2023-11-09 18:15:32 +00:00
parent 94b7c49196
commit 33376bf399

View file

@ -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,