mirror of
https://github.com/rclone/rclone.git
synced 2024-11-29 03:48:27 +08: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 == "/" {
|
if root == "/" {
|
||||||
return errors.New("can't remove root directory")
|
return errors.New("can't remove root directory")
|
||||||
}
|
}
|
||||||
|
root = f.opt.Enc.FromStandardPath(root)
|
||||||
|
|
||||||
if check {
|
if check {
|
||||||
// check directory exists
|
// 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)
|
return fmt.Errorf("Rmdir: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
root = f.opt.Enc.FromStandardPath(root)
|
|
||||||
// check directory empty
|
// check directory empty
|
||||||
arg := files.ListFolderArg{
|
arg := files.ListFolderArg{
|
||||||
Path: root,
|
Path: root,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user