1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-04 17:43:50 +00:00

check: improved reporting of differences in sizes and contents

fixes rclone check --download not showing differing files
This commit is contained in:
albertony
2025-11-01 20:23:01 +01:00
committed by GitHub
parent 1056ace80f
commit d240d044c3
4 changed files with 60 additions and 49 deletions

View File

@@ -125,12 +125,12 @@ func (b *bisyncRun) ReverseCryptCheckFn(ctx context.Context, dst, src fs.Object)
}
// DownloadCheckFn is a slightly modified version of Check with --download
func DownloadCheckFn(ctx context.Context, a, b fs.Object) (differ bool, noHash bool, err error) {
differ, err = operations.CheckIdenticalDownload(ctx, a, b)
func DownloadCheckFn(ctx context.Context, dst, src fs.Object) (equal bool, noHash bool, err error) {
equal, err = operations.CheckIdenticalDownload(ctx, src, dst)
if err != nil {
return true, true, fmt.Errorf("failed to download: %w", err)
}
return differ, false, nil
return equal, false, nil
}
// check potential conflicts (to avoid renaming if already identical)