| Summary: | New behavior of "extract here" (replacing old "autodetect subfolder") overwrites existing directory without asking | ||
|---|---|---|---|
| Product: | [Applications] ark | Reporter: | php4fan |
| Component: | general | Assignee: | Elvis Angelaccio <elvis.angelaccio> |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | CC: | ojsl, rthomsen6, silizium |
| Priority: | NOR | ||
| Version First Reported In: | 25.04.1 | ||
| Target Milestone: | --- | ||
| Platform: | Manjaro | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/utilities/ark/-/commit/7e3d11a44b4873083ed3093cca164f268f4985cf | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
php4fan
2025-05-27 15:29:30 UTC
I can confirm this issue on Debian Unstable (sid) using the latest KDE Plasma 6 environment. When extracting an archive using "Extract Here", Dolphin writes the contents into an already existing folder without warning, even if that folder is unrelated. If there are no filename conflicts, the extraction happens silently, creating a mess that is hard to clean up. This is risky and unexpected behavior. The previous "Extract Here (autodetect subfolder)" used to prevent this by creating a new folder like "folder (1)", which was much safer. Please consider bringing back the separate option or at least add a prompt asking the user whether to write into the existing folder, rename the extracted one, or cancel. **System information:** - Operating System: Debian GNU/Linux unstable (sid) - KDE Plasma Version: 6.3.x (latest from sid) - KDE Frameworks Version: 6.x - Qt Version: 6.7 - Kernel Version: 6.9.x (64-bit) - Dolphin Version: latest from Debian sid - Graphics Platform: X11 Thank you. A possibly relevant merge request was started @ https://invent.kde.org/utilities/ark/-/merge_requests/314 Git commit 189f1f4e411086d996d4e581c425a380d160b899 by Méven Car, on behalf of Vladislav Kachegov. Committed on 24/01/2026 at 10:35. Pushed by meven into branch 'master'. libarchive: prevent silent replacement of existing files by directory entries during extraction Libarchive reports directories with trailing slashes (e.g. "foo/"). If a file named "foo" already exists, Ark previously allowed libarchive to silently replace it with a directory. This change normalizes entry paths and prompts the user when a directory would replace an existing file. The reverse case (file over directory) is already handled and unchanged. M +38 -0 plugins/libarchive/libarchiveplugin.cpp https://invent.kde.org/utilities/ark/-/commit/189f1f4e411086d996d4e581c425a380d160b899 > This change normalizes entry paths and prompts the user when a directory would replace an existing file.
> The reverse case (file over directory) is already handled and unchanged.
Does this also fix the case of a directory overwriting a directory?
Git commit 7e3d11a44b4873083ed3093cca164f268f4985cf by Méven Car, on behalf of Rafał Lichwała. Committed on 03/02/2026 at 14:30. Pushed by meven into branch 'master'. extractiondialog: do not overwrite directory when extract When we extract archive which contains single folder as top level entry this action does not check if that folder already exists at destination and simply overwrites its content. This is completly unexpected and dangerous because may create mixed up directory contents which would be hard to restore. This action does not even warn user that such target directory exists and contents will be combined. This affects actions triggered by regular "Extract Dialog" (when archive is open on double-click) and context menu "Extract Here" action (when right-click on archive in a folder). This commit corrects this behavior in both places: 1. In "Extract Dialog" now there is the same warning message as it already appears when extracting to existing subfolder 2. In "Extract Here" (batch-mode and context menu) action when existing folder is detected it creates a new one (with common 'suggestName' mechanism) and extracts content there - intentionally creating a nested folder in such a case. M +1 -0 app/batchextract.cpp M +12 -4 kerfuffle/extractiondialog.cpp M +5 -0 kerfuffle/extractiondialog.h M +15 -5 kerfuffle/jobs.cpp M +1 -0 part/part.cpp https://invent.kde.org/utilities/ark/-/commit/7e3d11a44b4873083ed3093cca164f268f4985cf |