Deletion inside ZIP file

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
HuBa
Junior Member
Junior Member
Posts: 10
Joined: 2007-10-28, 19:40 UTC
Location: Hungary
Contact:

Deletion inside ZIP file

Post by *HuBa »

To reproduce the error please download the following zip file (136 Bytes):
http://www.filedropper.com/test_42

Inside of this ZIP there is a subfolder named "sub1", under it there is a "sub2" subfolder with a file named "file.txt".
The file contents are not important so the size of "file.txt" is zero.

Open the ZIP with TC and navigate under the "sub2" folder.

Delete the "file.txt" to get the party started.

Notice that the deletion was successfull but the "file.txt" is still displayed.

Right click on the "file.txt" to open the popup menu.
- View: two error dialogs are displayed but I think one would be enough.
- Edit: there is an error dialog but after that the editor is still started without opening a new file (maybe this should be avoided).
- Copy: correct error dialog.
- Rename: Access violation (report this error to the Author).
- Delete: correct error dialog.
- Properties: nothing happens.

Navigating back to the parent folder is blocked so the only way to escape from this situation is to press Ctrl+R to refresh the view.
Last edited by HuBa on 2015-08-11, 10:10 UTC, edited 2 times in total.
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3862
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Confirmed!
It is just the only file within the archive.
Deleting the very last file gets an empty archive remaining.
... press Ctrl+R to refresh the view
TC lacks to do a refresh at this special case.

Triying the same with 7-zip shows correctly an empty filelist at the archive root ...
#5767 Personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC cannot refresh the list in this case because the directory itself becomes invalid. Please press backspace to go to the root of the archive to refresh it.
Author of Total Commander
https://www.ghisler.com
HuBa
Junior Member
Junior Member
Posts: 10
Joined: 2007-10-28, 19:40 UTC
Location: Hungary
Contact:

Post by *HuBa »

ghisler(Author) wrote:Please press backspace to go to the root of the archive to refresh it.
This is what I wanted to do but it is not working in this case.
You can reproduce this bug using the provided zip file.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The problem is that the parent isn't valid either because you are 2 levels deep. This only happens with ZIP files where files are stored only with their (relative) path name, but the directories themselves are not stored in the ZIP. TC itself and most ZIP packers always store the directories too.

You can use Ctrl+R to re-read the current panel - this will leave the current archive, though. Or use the breadcrumb bar.
Author of Total Commander
https://www.ghisler.com
HuBa
Junior Member
Junior Member
Posts: 10
Joined: 2007-10-28, 19:40 UTC
Location: Hungary
Contact:

Post by *HuBa »

ghisler(Author) wrote:This only happens with ZIP files where files are stored only with their (relative) path name, but the directories themselves are not stored in the ZIP. TC itself and most ZIP packers always store the directories too.
You can easily create a zip file without directories using TC:
In TC create a ZIP file with a directory structure: sub1/sub2/file.txt.
Directories are also stored here, that's fine.
Now navigate to file.txt and rename it. The rename operation will reveal the full path for the file so you can edit the directory names as well.
Rename the file to sub1_/sub2_/file.txt
Go back to the root of the zip. Now you can see that there are "sub1" and "sub1_" folders.
Navigate to sub1_/sub2_/file.txt and delete it.
Now you can reproduce the same issues as described in the initial post.
Post Reply