#1358 Dangerous -sdel option behavior

open
nobody
None
5
2014-08-29
2013-04-02
Piotr Pxxx
No

I've encountered a dangerous behavior of -sdel commandline option in 7-Zip 9.30 alpha version from 2012-10-26

After executing the following example command two times, the just created archive is being deleted (this is logical behavior of deleting just archived files, but in my opinion unexpected and very unwanted):

7z a -sdel arch.7z *

To workaround this problem I've added a simple exception rule to my command line (not always a good idea, but for me it works fine)

7z a -sdel -x!arch.7z arch.7z *

I would expect the 7-Zip to delete all compressed files BUT the archive itself. The just created archive should not be deleted under any circumstances by 7-Zip.

Discussion

  • Shell
    Shell
    2013-06-29

    It is quite an uncommon situation when an archive is added to itself. However, deleting it is certainly a bug.