Bug 428436

Summary: File already exist dialog says "identical files" but they are not
Product: [Frameworks and Libraries] frameworks-kio Reporter: Filippo Volpe <filippovolpe98>
Component: Overwrite dialogAssignee: KIO Bugs <kio-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: a.samirh78, justin.zobel, kdelibs-bugs, kfm-devel, meven.car, meven29, nate
Priority: NOR    
Version: 5.75.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: The dialog onpened, on the left the original file, trust me the other is different but o cannot upload two attachements.

Description Filippo Volpe 2020-10-29 15:51:12 UTC
Created attachment 132864 [details]
The dialog onpened, on the left the original file, trust me the other is different but o cannot upload two attachements.

SUMMARY
In a new installation i was unpacking the backup (.tar) from ark to my home folder with a drag-and-drop and fair enough it finds that for example ".bashrc" already exists and the relative "File already exist" window opens but it says that the files are identical but they really are not.

STEPS TO REPRODUCE
1. Take a file opened in the folder in Dolphin
2. Put that file in an archive (.tar or .tar.gz)
3. Modify the original file in the folder
3. Drag-and-drop the file from the archive to the folder with the same-name one

OBSERVED RESULT
The dialog says the files are identical

EXPECTED RESULT
The dialog says the files are not identical

SOFTWARE/OS VERSIONS
Linux, Arch, kernel: 5.9.1-arch1-1
KDE Plasma Version: 5.20.1
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1

ADDITIONAL INFORMATION
Comment 1 Justin Zobel 2020-10-29 21:54:42 UTC
Confirmed on git master.

Likely it is only checking filename. Size and sha256sum (or similar) would be different as file has been edited.
Comment 2 Filippo Volpe 2020-10-29 22:02:29 UTC
(In reply to Justin Zobel from comment #1)
> Confirmed on git master.
> 
> Likely it is only checking filename. Size and sha256sum (or similar) would
> be different as file has been edited.

Yes but I noticed that if you do the same thing between folders (not from an archive) it rightfully says "files are not identical".

Moreover the dialog in the attachment says the sizes are the same but they were not.
Comment 3 Méven Car 2020-11-03 17:22:55 UTC
Any file whose size < 12KB are supposed to be entirely compared, otherwise it would "Files seem identical"
https://invent.kde.org/frameworks/kio/-/merge_requests/22/diffs#3568ec06a105c99c8932fa7bf9b663600480ffde_94_99

I can reproduce it, most likely an issue with the archive ioslave or ark.
Comment 4 Méven Car 2020-11-03 17:37:30 UTC
I think this is a duplicate with an updated form.

A fix has been proposed.
https://phabricator.kde.org/D27181

*** This bug has been marked as a duplicate of bug 403146 ***