From 33376bf3999cb1078da73a358fde4046bbac03c2 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 9 Nov 2023 18:15:32 +0000 Subject: [PATCH] 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 --- backend/dropbox/dropbox.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/dropbox/dropbox.go b/backend/dropbox/dropbox.go index 4447e13d5..bce405ec2 100644 --- a/backend/dropbox/dropbox.go +++ b/backend/dropbox/dropbox.go @@ -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,