Bug 412662

Summary: Overwrite dialog: Show if files are identical
Product: [Frameworks and Libraries] frameworks-kio Reporter: Gregor Mi <codestruct>
Component: Overwrite dialogAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: wishlist CC: kdelibs-bugs, meven29, nate
Priority: NOR    
Version: 5.60.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.73
Sentry Crash Report:
Attachments: File Already Exists dialog
File Already Exists - with Skip (when multiple files are copied at once)

Description Gregor Mi 2019-10-06 11:21:41 UTC
Created attachment 123051 [details]
File Already Exists dialog

Recently, I guided an occasional Plasma user when she wanted to sort out which of here files were already copied to an external USB drive and which ones were newer or missing. The following is one of the findings for potential improvement.

Look at the attached screenshots. Both files (source and destination) are identical but this not obvious at first glance.

IDEA: (at least for small files) calculate hash of the file content and display it clear to the user when those files are content-wise identical.
Comment 1 Gregor Mi 2019-10-06 11:22:35 UTC
Created attachment 123052 [details]
File Already Exists - with Skip (when multiple files are copied at once)
Comment 2 Nate Graham 2019-10-06 22:31:24 UTC
In fact, if the files actually are identical by checksum comparison (or whatever), maybe we should just auto-skip without even prompting the user. What do you think?
Comment 3 Gregor Mi 2019-10-15 20:04:18 UTC
(In reply to Nate Graham from comment #2)
> In fact, if the files actually are identical by checksum comparison (or
> whatever), maybe we should just auto-skip without even prompting the user.
> What do you think?

Sounds good.

I wonder what should happen for the corner case when the file contents is equal but not the file modification date. I think that skipping would also be ok for that.
Comment 4 Méven Car 2020-05-23 17:36:07 UTC
Relates to 421557
Comment 5 David Faure 2020-07-25 09:13:49 UTC
Git commit d712d8e70f85b79a4fdff54531727989b39e0a4e by David Faure, on behalf of Méven Car.
Committed on 25/07/2020 at 09:13.
Pushed by dfaure into branch 'master'.

RenameDialog: Show if files are identical

Compute and compare three hashes in the files :
 - beginning of the files
 - middle of the files
 - end of the file
FIXED-IN: 5.72

M  +121  -12   src/widgets/renamedialog.cpp

https://invent.kde.org/frameworks/kio/commit/d712d8e70f85b79a4fdff54531727989b39e0a4e
Comment 6 Méven Car 2020-07-25 12:56:04 UTC
The commit message should be FIXED-IN: 5.73