https://bugs.kde.org/show_bug.cgi?id=504869

            Bug ID: 504869
           Summary: New behavior of "extract here" (replacing old
                    "autodetect subfolder") overwrites existing directory
                    without asking
    Classification: Applications
           Product: ark
      Version First 25.04.1
       Reported In:
          Platform: Manjaro
                OS: Linux
            Status: REPORTED
          Severity: critical
          Priority: NOR
         Component: general
          Assignee: elvis.angelac...@kde.org
          Reporter: php4...@gmail.com
                CC: rthoms...@gmail.com
  Target Milestone: ---

SUMMARY

I already mentioned this in a comment to
https://bugs.kde.org/show_bug.cgi?id=483706 and, if I remember correctly, it
was me who reopened that issue because of it, but there has been no reply. So
here I am trying to report this as a separate issue (probably what I should
have done in the first place). This is very serious and needs to be fixed,
don't underestimate the danger of it please.

Relatively recently, the option "extract here (autodetect subfolder)" was
removed from the context menu and the "extract here" option was changed to have
basically the behavior of the old "extract here (autodetect subfolder)".

However, the new "extract here" option has a crucial flaw, in that, if a folder
already exist with the name of the one that is going to be created, it will be
written into without warning. If there are files and subdirectories with
conflicting filenames inside the directory, you will get the OS's usual prompt
about whether to overwrite etc, but otherwise (and anyway for the names that
don't conflict), the files will be extracted into the existing directory
silently. Either way, the result can be an absolute disaster, potentially
unrecoverable.

Before you underestimate the seriousness of this, you need to consider that
even if a folder exists with the same name, it could be a totally unrelated
folder, in which case it's likely that many of the files and subfolder that you
are going to extract have non-conflicting names, and these will just be
extracted into the existing folder before you realize it and with no
opportunity to stop it. So, even if you don't end up overwriting anything
(because you do get a prompt before _that_ happens), you can end up with a mess
that will take a lot of work to clean up.


STEPS TO REPRODUCE
1. have a zip file called mything.zip containing the following:
```
# contents of mything.zip
- mything         # folder
-- file1.txt
-- file2.txt
```
2. Next to it, within the same parent folder, have a folder called "mything"
3. Right-click on `mything.zip` and do "extract here"

OBSERVED RESULT
The files extracted from the zip file will be written into the existing folder
"mything" with no prompt. If there are files or subfolder with conflicting
names, the OS will ask you whether to rename them, overwrite (or write into in
the case of directories) or skip; otherwise, the entire thing will happen
silently. Either way, you won't be given a warning that the root folder already
exist nor a choice of what to do.

EXPECTED RESULT
You should get a prompt telling you that a folder called "mything" already
exist, and a choice whether to write into it, rename the folder being
extracted, or cancel. Or at the very least, a warning and a choice whether to
continue or cancel.

Note that the behavior of the old "extract here, autodetect subfolder" was to
automatically rename the extracted directory appending a "(1)" (or "(2)" etc.)
to the name. While it wasn't the best behavior possible in that it didn't give
you a choice or a warning, it was a perfectly acceptable behavior.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Kernel Version: 6.6.90-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 12 × 12th Gen Intel® Core™ i7-1255U
Memory: 15.3 GiB of RAM
Graphics Processor: Intel® Iris® Xe Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: Vivobook_ASUSLaptop X1502ZA_F1502ZA
System Version: 1.0

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to