Bug 436556 - When Ark overwrites existing files, the dialog says "The files seem identical" even if different
Summary: When Ark overwrites existing files, the dialog says "The files seem identical...
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 21.04.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-03 22:01 UTC by nyanpasu64
Modified: 2022-01-14 01:26 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 22.04


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nyanpasu64 2021-05-03 22:01:52 UTC
SUMMARY
When I open a .7z file in Ark, and drag "filename" into a directory already containing "filename", it erroneously says the source and destination are identical, even if they're not.

STEPS TO REPRODUCE
1. Create a file and put it into an archive (.7z works, .tar.gz works).
2. Edit the file on-disk so it differs from the archive (preferably a different size).
3. Open the archive in Ark, and drag the file out of the archive.

OBSERVED RESULT
The "File Already Exists" dialog says that "This action will overwrite the destination". However, the displayed Source size matches the destination's file size, not the actual source (the file in the archive being extracted). Additionally, the dialog says "The files are identical" even when it is not the case.

Clicking Overwrite successfully overwrites the destination file with the (source) file in the archive, changing the contents and size.

If you're extracting a .7z archive, Ark creates a .ark-.(random letters) folder. If you open Dolphin and shift-drag (move) this file from the .ark-... folder into the parent folder, the resulting dialog properly shows the files as different.

EXPECTED RESULT
The "File Already Exists" dialog properly computes the source file size and whether they're identical.

SOFTWARE/OS VERSIONS
Operating System: Garuda Linux
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Kernel Version: 5.11.17-152-tkg-bmq
OS Type: 64-bit
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 520

ADDITIONAL INFORMATION
Hopefully the Qt/KDE packages I'm using come from Arch, and weren't tampered with by Garuda.
Comment 1 olivierguth.d 2021-05-15 12:30:52 UTC
I have observed the same behaviour with a .rar file. The extracted file with the same name as one in the destination directory being a .jpg picture, in the "File already exists" dialog, the preview of the file in the archive is replaced by a preview of the file in the destination directory.

Archlinux package

ark version 21.04.1
Comment 2 Yevhen Popok 2021-06-28 15:41:33 UTC
Can confirm this with Ark.
Looks like it's not reproducible with Krusader (which have built-in archive manager). I tried to copy file on a second Krusader's panel and also tried to drag'n'drop it to Dolphin. In both cases dialog reported that files are different.
Comment 3 Albert Astals Cid 2021-12-28 00:29:42 UTC
Git commit 447eefde66a55770128329ccf22a8ae99568c51d by Albert Astals Cid.
Committed on 28/12/2021 at 00:28.
Pushed by aacid into branch '436556'.

Overwrite dialog: Don't pretend source and dest url are the same

Otherwise it will the dialog will say "origin and source are the same
file", which obviously isn't true

M  +1    -1    kerfuffle/queries.cpp

https://invent.kde.org/utilities/ark/commit/447eefde66a55770128329ccf22a8ae99568c51d
Comment 4 Albert Astals Cid 2021-12-28 00:30:42 UTC
Not fixed, patch still in review at https://invent.kde.org/utilities/ark/-/merge_requests/89
Comment 5 Albert Astals Cid 2022-01-12 22:27:15 UTC
Git commit 7fc74b673e153addeba5bc541d6318f21ad5d4d4 by Albert Astals Cid.
Committed on 12/01/2022 at 22:24.
Pushed by aacid into branch 'release/21.12'.

Overwrite dialog: Don't pretend source and dest url are the same

Otherwise it will the dialog will say "origin and source are the same
file", which obviously isn't true

M  +1    -1    kerfuffle/queries.cpp

https://invent.kde.org/utilities/ark/commit/7fc74b673e153addeba5bc541d6318f21ad5d4d4