Bug 410160

Summary: Not respecting "Preserve paths when extracting"
Product: [Applications] ark Reporter: Jazz <iguanamiyagi>
Component: generalAssignee: Elvis Angelaccio <elvis.angelaccio>
Status: REPORTED ---    
Severity: normal CC: justin.zobel, rthomsen6
Priority: NOR    
Version First Reported In: 19.04.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jazz 2019-07-24 13:52:33 UTC
SUMMARY
Ark does not respect "Preserve paths when extracting" in case you want to extract files from archive multiple times with and then - without that particular setting enabled.

STEPS TO REPRODUCE
1. Open an archive with ark as root
2. Right click any file/folder and Extract > Extract to...
3. Enable "Preserve paths when extracting"
4. Extract the file/folder
5. Delete entirely the new path you just created 
6. Right click the same file and again Extract > Extract to...
7. Disable "Preserve paths when extracting"
8. Extract the file/folder to the same path as per #4 above
9. Even you have deleted the previously extracted items, ark complains "This action will overwrite the destination."

OBSERVED RESULT
Step #9 above is critical, since ark doesn't follow the new (disabled) setting for "Preserve paths when extracting" with the new extraction. Second issue: in #5 above I deleted the previous extraction, but in #9 it complains about the duplicate destination file that doesn't exist??

EXPECTED RESULT
Ark should update its settings from a popup window for each and every extraction individually.

Ark should not complain reg. duplicate destination files/folders in case previous files/folders don't exist at the destination path anymore. I guess this is due to extracting into temporary folder first, which may cause this issue, but it's misleading, confusing and not user friendly.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro Linux
KDE Plasma Version: 5.16.3
KDE Frameworks Version: 5.60.0
Qt Version: 5.13.0

ADDITIONAL INFORMATION
During "File Already Exists" message, Ark displays the size of Source AND Destination as 0 B, which is wrong for Source! Since Destination file doesn't exist, it's ok to display its size as 0 B, but source obviously contains something within and couldn't be 0 B.
Comment 1 Elvis Angelaccio 2019-07-28 11:21:23 UTC
(In reply to Jazz from comment #0)
> 
> STEPS TO REPRODUCE
> 1. Open an archive with ark as root

Please don't do that. Running ark as root is untested/unsupported.
Comment 2 Jazz 2019-07-28 17:06:24 UTC
Yes, I can confirm this affects only if used as root. If ark is opened as a normal user it works just fine. However, this is an issue, since I can't use ark to extract some files for my directories that belong to root, therefore I am forced to use 7zip for now.
Comment 3 Justin Zobel 2020-12-01 07:45:06 UTC
I believe opening ark as root is along the same lines as dolphin, it should be disabled.