Bug 487229

Summary: Ark does not clean up temporary drag and drop folders
Product: [Applications] ark Reporter: Martin Fritz <Fritz.Martin99>
Component: generalAssignee: Elvis Angelaccio <elvis.angelaccio>
Status: RESOLVED FIXED    
Severity: normal CC: c3i8zv295, kocelfc, rthomsen6
Priority: NOR    
Version: 24.02.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 24.08.0
Sentry Crash Report:

Description Martin Fritz 2024-05-19 10:30:23 UTC
SUMMARY
when using drag and drop instead of the "extract" button to extract files from an archive ark does not delete the created .ark_XXXXXX folder after completion of the task or on failure

STEPS TO REPRODUCE
1. extract files via drag and drop

OBSERVED RESULT
The .ark_XXXXX folder that is created by ark on drag_and_drop operations in the target folder will persist 

EXPECTED RESULT
ark cleans up the .ark_XXXXX folder and deletes it

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.8.9-1-default (64-bit) (opensuse Tumbleweed)
(available in About System)
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0

ADDITIONAL INFORMATION
Comment 1 Julius R. 2024-05-22 16:42:58 UTC
I can confirm this bug. :/
Running Manjaro with Kernel 6.8 and KDE Plasma 6.0.4.
Comment 2 Elvis Angelaccio 2024-06-08 15:58:26 UTC
It looks like this is a regression in Qt 6.7.

I have a workaround locally, but I'd prefer to fix the actual bug in Qt.
Comment 3 Bug Janitor Service 2024-06-22 16:04:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/ark/-/merge_requests/251
Comment 4 Albert Astals Cid 2024-07-02 21:24:18 UTC
Git commit 85c5e26f581cf011638a53e62b92e1da8fd55fcd by Albert Astals Cid, on behalf of Elvis Angelaccio.
Committed on 02/07/2024 at 21:17.
Pushed by aacid into branch 'master'.

cliinterface: adapt to behavior change in QTemporaryDir

Qt 6.7 changed the behavior of QTemporaryDir (see commit 935562a77b in
qtbase.git) and now QTemporaryDir::path() returns a relative path rather
than an absolute one.

We were relying on the old behavior which ensured that the extract temp
dir would always auto-delete itself, regardless of the ark CWD.

This is no longer working, because now when the temp dir gets deleted,
its destructor tries to delete a relative path, but meanwhile ark has
already changed the CWD and so that path does not exist.

The fix is to create the QTemporaryDir with an absolute path (but still
as hidden folder in the CWD), so we get back the old behavior (the
returned QTemporaryDir::path() will again be absolute).

M  +1    -1    kerfuffle/cliinterface.cpp

https://invent.kde.org/utilities/ark/-/commit/85c5e26f581cf011638a53e62b92e1da8fd55fcd