"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
dedupe: count Checks in the stats while scanning for duplicates
Nick Craig-Wood653bc2372845
diff --git a/fs/operations/dedupe.go b/fs/operations/dedupe.goindex 32daa9d4d..ca4376a29 100644--- a/fs/operations/dedupe.go+++ b/fs/operations/dedupe.go@@ -11,6 +11,7 @@ import ("strings""github.com/rclone/rclone/fs"+ "github.com/rclone/rclone/fs/accounting""github.com/rclone/rclone/fs/config""github.com/rclone/rclone/fs/hash""github.com/rclone/rclone/fs/walk"@@ -285,6 +286,8 @@ func dedupeFindDuplicateDirs(ctx context.Context, f fs.Fs) (duplicateDirs [][]*dci := fs.GetConfig(ctx)err = walk.ListR(ctx, f, "", true, ci.MaxDepth, walk.ListAll, func(entries fs.DirEntries) error {for _, entry := range entries {+ tr := accounting.Stats(ctx).NewCheckingTransfer(entry)+remote := entry.Remote()parentRemote := path.Dir(remote)if parentRemote == "." {@@ -318,6 +321,7 @@ func dedupeFindDuplicateDirs(ctx context.Context, f fs.Fs) (duplicateDirs [][]*d}dirsByID.increment(parent)+ tr.Done(ctx, nil)}return nil})@@ -434,6 +438,9 @@ func Deduplicate(ctx context.Context, f fs.Fs, mode DeduplicateMode, byHash boolfiles := map[string][]fs.Object{}err := walk.ListR(ctx, f, "", true, ci.MaxDepth, walk.ListObjects, func(entries fs.DirEntries) error {entries.ForObject(func(o fs.Object) {+ tr := accounting.Stats(ctx).NewCheckingTransfer(o)+ defer tr.Done(ctx, nil)+var remote stringvar err errorif byHash {