[FIXED] Archive destruction when extracting and overwriting
Moderators: Hacker, petermad, Stefan2, white
[FIXED] Archive destruction when extracting and overwriting
When an archive is overwritten with a contained file with the same name as the archive, the archive is destroyed.
Example with internal ZIP:
C:\test.zip\bla.txt
C:\test.zip\test.zip
Overwrite C:\test.zip with C:\test.zip\test.zip, accept overwrite warning:
=> C:\test.zip has 0 bytes.
Example with SQX plugin:
C:\test.sqx\bla.txt
C:\test.sqx\test.sqx
Overwrite C:\test.sqx with C:\test.sqx\test.sqx, accept overwrite warning:
=> C:\test.sqx is gone.
WinRAR doesn't show this behaviour, the original file survives!
Tested with TC 7.03 and TC 6.58.
Icfu
Example with internal ZIP:
C:\test.zip\bla.txt
C:\test.zip\test.zip
Overwrite C:\test.zip with C:\test.zip\test.zip, accept overwrite warning:
=> C:\test.zip has 0 bytes.
Example with SQX plugin:
C:\test.sqx\bla.txt
C:\test.sqx\test.sqx
Overwrite C:\test.sqx with C:\test.sqx\test.sqx, accept overwrite warning:
=> C:\test.sqx is gone.
WinRAR doesn't show this behaviour, the original file survives!
Tested with TC 7.03 and TC 6.58.
Icfu
Last edited by icfu on 2008-08-01, 08:47 UTC, edited 1 time in total.
This account is for sale
Confirmed (TC7.03, Win2k SP4).
Everything OK (overwriting itself on extracting does NOT happen) with:
- ACE: WinACE 2.61
- RAR (internal + external: WinRAR 3.71)
- TAR (internal + external: WinRAR 3.71)
- ZIP external: PKUNZIP 2.50
0 Byte sized archive using:
- ZIP (internal)
Archive deleted using:
- ARJ 2.41
- LZH 2.13
Archive destroyed (containing only some NULL-bytes) using:
- GZ (internal; test.gz\test.gz)
Opening and unpacking the archive not possible:
- UC2: UC2r3 (test.uc2\test.uc2)
Everything OK (overwriting itself on extracting does NOT happen) with:
- ACE: WinACE 2.61
- RAR (internal + external: WinRAR 3.71)
- TAR (internal + external: WinRAR 3.71)
- ZIP external: PKUNZIP 2.50
0 Byte sized archive using:
- ZIP (internal)
Archive deleted using:
- ARJ 2.41
- LZH 2.13
Archive destroyed (containing only some NULL-bytes) using:
- GZ (internal; test.gz\test.gz)
Opening and unpacking the archive not possible:
- UC2: UC2r3 (test.uc2\test.uc2)
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
-- TC starter menu: Fast yet descriptive command access!
- ghisler(Author)
- Site Admin
- Posts: 49100
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
What do you expect when doing such a foolish thing? Sorry, but Total Commander cannot prevent every possible user error.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I would expect TC to not allow overwriting a currently opened archive, I guess.
Isn't it TC which is able to lock directories from deleting which are only opened in TC and nowhere else?
TC shows so many foolish confirmation boxes daily, like "no text selected" in lister, although no data loss can occur, that I really wonder about your weird reaction on my bug report.
I would also expect you to not answer in the forum if someone has pissed in your coffee in the morning. That's not my fault!
Icfu
Isn't it TC which is able to lock directories from deleting which are only opened in TC and nowhere else?
TC shows so many foolish confirmation boxes daily, like "no text selected" in lister, although no data loss can occur, that I really wonder about your weird reaction on my bug report.
I would also expect you to not answer in the forum if someone has pissed in your coffee in the morning. That's not my fault!
Icfu
Last edited by icfu on 2008-05-08, 16:27 UTC, edited 1 time in total.
This account is for sale
- ghisler(Author)
- Site Admin
- Posts: 49100
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Well, TC doesn't lock the file which is currently being unpacked, so you can for example already look into the currently unpacked file while it is still unpacking in the background, or unpacking other files from the archive. It also allows to unpack files from archives which are currently opened in other programs, e.g. while they are still downloaded. All this wouldn't be possible if either the source or the target is opened with exclusive access...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
This is true for ZIP, not for RAR. You cannot extract files from running RAR downloads.It also allows to unpack files from archives which are currently opened in other programs, e.g. while they are still downloaded.
You know the source filename.All this wouldn't be possible if either the source or the target is opened with exclusive access...
You know the target filename.
You know the name of the currently opened archive.
Even if you don't open with exclusive access, you can prevent overwriting in the current TC instance, by making sure that target filename != opened archive name.
Icfu
This account is for sale
- ghisler(Author)
- Site Admin
- Posts: 49100
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, this could be done easily, but doesn't take into account hard links, junctions etc.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com