mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
dedupe: Use walk.ListR for listing commands.
This dramatically increases the speed (7x in my tests) of the de-dupe as google drive supports ListR directly and dedupe did not work with `--fast-list`. Fixes #2902
This commit is contained in:
@@ -161,10 +161,7 @@ func TestDeduplicateRename(t *testing.T) {
|
||||
err := operations.Deduplicate(r.Fremote, operations.DeduplicateRename)
|
||||
require.NoError(t, err)
|
||||
|
||||
require.NoError(t, walk.Walk(r.Fremote, "", true, -1, func(dirPath string, entries fs.DirEntries, err error) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
require.NoError(t, walk.ListR(r.Fremote, "", true, -1, walk.ListObjects, func(entries fs.DirEntries) error {
|
||||
entries.ForObject(func(o fs.Object) {
|
||||
remote := o.Remote()
|
||||
if remote != "one-1.txt" &&
|
||||
|
||||
Reference in New Issue
Block a user