Summary: | Ark does not preserve user generated xattrs (extended attributes) when editing/updating/saving a .zip file (and other types of archives) | ||
---|---|---|---|
Product: | [Applications] ark | Reporter: | funkybomber |
Component: | general | Assignee: | Elvis Angelaccio <elvis.angelaccio> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | 4wy78uwh, aacid, kmcwilliampublic, kubry, nate, rthomsen6, tagwerk19 |
Priority: | NOR | Keywords: | bounty |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/utilities/ark/-/commit/2b1e0a83abc7523df83513ad997a3e3489f30748 | Version Fixed In: | 24.02 |
Description
funkybomber
2021-03-27 04:51:07 UTC
This bug is still present in the latest KDE Neon Unstable edition. I would like to offer a bounty of $200 (USD) to fix this. This will also be posted in the KDE forum under "Sponsored Work": https://discuss.kde.org/t/about-the-sponsored-work-category/5358 Last tested under: SOFTWARE/OS VERSIONS KDE Plasma Version: 5.90.90 KDE Frameworks Version: 5.264.0 Qt Version: 6.6.0 Kernel version: 6.2.0-37-generic (64-bit) Graphics Platform: Wayland Tested in a Virtual Machine (in QEMU v4.0.0) with the following specs: Processor: 2 × Intel® Core™ i3-4150 CPU @ 3.50GHz Memory: 3.8 GiB of RAM Graphics Processor: llvmpipe Manufacturer: QEMU Product name: Standard PC (Q35 + ICH9, 2009) System version: pc-q35-6.2 Relevant link for discussion on the bug & the bounty: https://discuss.kde.org/t/bug-fix-ark-does-not-preserve-user-generated-xattrs-extended-attributes-when-editing-updating-saving-a-zip-file-and-other-types-of-archives/8591 A gradual process, fixing one application after another... For Gwenview, see Bug 431146 A possibly relevant merge request was started @ https://invent.kde.org/utilities/ark/-/merge_requests/219 In the linked merge request I have fixed this issue for the following scenarios: - Adding files to the archive - Copying files within the archive - Deleting / removing files from the archive - Encrypting the archive - Moving files within the archive For all of these situations the metadata is now preserved. Are you aware of any other operations that cause the metadata to be lost? (In reply to Kristen McWilliam from comment #5) > In the linked merge request I have fixed this issue for the following > scenarios: > > - Adding files to the archive > - Copying files within the archive > - Deleting / removing files from the archive > - Encrypting the archive > - Moving files within the archive > > For all of these situations the metadata is now preserved. Are you aware of > any other operations that cause the metadata to be lost? Thanks for working on this! :) I think you should also look into the "Rename file within the archive" scenario. This also causes loss of xattrs. Please also note that xattrs are also lost in operations involving *folders* I recommend you look into: Adding folders in the archive (you can test with empty ones) Moving folders within the archive (so that they become subfolders) Removing folders from the archive Renaming folders within the archive Basically whatever action results in a different file/folder structure within the archive will result in a loss of xattrs. I am happy to report that all of these scenarios are also covered by the current changes. :) (In reply to Kristen McWilliam from comment #8) > I am happy to report that all of these scenarios are also covered by the > current changes. :) That's great news! Has it been merged into Unstable already? If it has I will give it a try later today. Would you like to send me your details & preferred method of payment for the bounty? Cheers! It hasn't been merged yet, it still needs a review first. I will let you know when it is so you can test it out. :) Git commit 2b1e0a83abc7523df83513ad997a3e3489f30748 by Nicolas Fella, on behalf of Kristen McWilliam. Committed on 09/01/2024 at 00:55. Pushed by nicolasfella into branch 'master'. fix: preserve archive metadata during operations Currently metadata on an archive is lost when it is modified by Ark. This change ensures that metadata is preserved during operations. M +1 -0 .kde-ci.yml M +1 -0 CMakeLists.txt M +1 -0 autotests/kerfuffle/CMakeLists.txt A +- -- autotests/kerfuffle/data/archive-with-metadata.zip A +237 -0 autotests/kerfuffle/preservemetadatatest.cpp [License: BSD] M +2 -0 kerfuffle/CMakeLists.txt M +27 -0 kerfuffle/archive_kerfuffle.cpp M +14 -0 kerfuffle/archive_kerfuffle.h A +43 -0 kerfuffle/metadatabackup.cpp [License: BSD] A +51 -0 kerfuffle/metadatabackup.h [License: BSD] https://invent.kde.org/utilities/ark/-/commit/2b1e0a83abc7523df83513ad997a3e3489f30748 The patch was tested and confirmed working in the flatpak nightly. The bounty has been paid to the developer. |