Bug 484669 - "Extract here and delete archive" deletes only the first (.part1) file for multi-part RAR archives
Summary: "Extract here and delete archive" deletes only the first (.part1) file for mu...
Status: CONFIRMED
Alias: None
Product: ark
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.02.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-28 16:04 UTC by Dick Tracey
Modified: 2025-06-26 19:47 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dick Tracey 2024-03-28 16:04:45 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
"Extract here and delete archive" deletes only the first (.part1) file for multi-part RAR archives

STEPS TO REPRODUCE
1. In Dolphin, right click on the first part of a multi-part RAR archive, and click on "Extract here and delete archive"
2. 
3. 

OBSERVED RESULT
After extraction, .part1 is moved to Trash

EXPECTED RESULT
All parts (.part*) should be removed

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 24.02.1
Qt Version: 6.6.2

ADDITIONAL INFORMATION
Comment 1 Severin von Wnuck-Lipinski 2024-04-16 17:43:58 UTC
Hi,

I can confirm this behavior on my system. I'm afraid I didn't consider multi-volume archives when implementing this feature. Unfortunately, it's also not that easy to fix:

- Ark uses various plugins for different types of archives (e.g. p7zip for 7-Zip archives, unrar for RAR archives, etc.)
- Most (but not all) plugins only pass the file name of the first (.part1) archive to the underlying archive program/library for extraction
- The paths of the others parts are resolved internally by the program/library
- Thus, we can't delete the other parts (.partX) after extraction, as we don't have their file paths

To solve this issue, we could try to implement a function that finds the other parts of the archive. This is rather difficult because the .partX naming scheme is not used by all archive types (7-Zip also uses .7z.XXX for example).
Comment 2 Dick Tracey 2024-05-15 05:12:51 UTC
Isn't it better to remove/disable this functionality, at least for ".part*" archives, until a proper fix is in place? The current behavior is not good in my opinion.
Comment 3 Eduardo Correia 2024-08-08 16:39:36 UTC
Bug confirmed also on my system. Nobara 40, Plasma 6.1.3, frameworks 6.4.0, Kernel 6.10.3 . It affects other compressed formats, not only RARs. 
7z files with .001 , .002 etc extensions are also affected by this bug. The first one gets deleted (.001) but all the others remain.
Comment 4 Antti Savolainen 2025-01-11 07:29:17 UTC
I encountered this bug today.
Comment 5 Eduardo Correia 2025-06-26 19:47:43 UTC
Another year later since I last commented on this bug, I am here to confirm that this bug is still very much present and actively being ignored. June 2025, KDE Plasma 6.4