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,