Bug 446782

Summary: Ark silently appends to existing archive
Product: [Applications] ark Reporter: Nicolas Fella <nicolas.fella>
Component: generalAssignee: Elvis Angelaccio <elvis.angelaccio>
Status: RESOLVED FIXED    
Severity: normal CC: aacid, rthomsen6, wazhai
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Nicolas Fella 2021-12-10 12:41:09 UTC
STEPS TO REPRODUCE
1. Open Dolpin in /home/user
2. Select two files
3. Right click > Compress > Compress to
4. Click Ok
The archive user.tar.gz is created
5. Select two other files
6. Right click > Compress > Compress to
7. Click Ok

OBSERVED RESULT
The files are appended to user.tar.gz

EXPECTED RESULT
Ark should prompt the user that this file already exists and ask for confirmation that appending is wanted or create a "user(1).tar.gz" file

SOFTWARE/OS VERSIONS
Everything master
Comment 1 Bug Janitor Service 2023-08-18 15:27:39 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/ark/-/merge_requests/189
Comment 2 Bug Janitor Service 2023-09-19 09:57:39 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/ark/-/merge_requests/198
Comment 3 Elvis Angelaccio 2025-03-27 19:09:40 UTC
Git commit 7e1927a1c8c9f74759c0431f6bfc30fe1c6b03a3 by Elvis Angelaccio, on behalf of Ilya Pominov.
Committed on 27/03/2025 at 18:56.
Pushed by elvisangelaccio into branch 'master'.

[addtoarchive]: Add warning dialog about existing file

STEPS TO REPRODUCE:
1. In context menu Dolphin click Compress->Compress to...
2. Enter the name of a file that already exists
3. Click OK

EXPECTED RESULT:
Ark will suggest overwriting the file

OBSERVED RESULT:
Ark will overwrite the file without informing the user

M  +25   -0    kerfuffle/addtoarchive.cpp
M  +1    -0    kerfuffle/addtoarchive.h

https://invent.kde.org/utilities/ark/-/commit/7e1927a1c8c9f74759c0431f6bfc30fe1c6b03a3