+Archive + prev search results + F3

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

+Archive + prev search results + F3

Post by *MarcinW »

There is a problem with archive contents in the search results list.

To help to reproduce the problem, I attached below a test.zip file with contents:
test.zip/test1.txt - file with 200 chars '1',
test.zip/test2.txt - file with 200 chars '2'.


Problem 1:
1) Save test.zip to C:\test\test.zip
2) Go to directory C:\test\
3) Press Alt+F7
4) Check "Search archives" option
5) Check "Find text" option and enter text: 111
6) Start searching, so you will see on the result list: C:\test\test.zip/test1.txt
7) Select this result and press F3 just to see file contents - you can see a lot of chars '1'
8) Close Lister
9) Select the result and press "Go to file" button
10) Delete file test1.txt inside archive
11) Press Alt+F7 again
12) Select on the result list: C:\test\test.zip/test1.txt
13) Press F3 - now you will see a lot of chars '2' instead of '1' - contents of test2.txt will be shown instead of test1.txt


Problem 2:
1, 2, 3, 4) As above
5) Check "Find text" option and enter text: 222
6) Start searching, so you will see on the result list: C:\test\test.zip/test2.txt
7) Select this result and press F3 just to see file contents - you can see a lot of chars '2'
8) Close Lister
9) Select the result and press "Go to file" button
10) Delete file test2.txt inside archive
11) Press Alt+F7 again
12) Select on the result list: C:\test\test.zip/test2.txt
13) Press F3 - now you will see an error message: "Error in packed file C:\test\test.zip" (but test.zip is a valid ZIP file)


After pressing F3, TC probably uses - instead of name and path of the packed file - an internal index of this file inside an archive. When archive structure changes, this index may point to another file or to a non-existent file.

I haven't checked other than ZIP archive formats, but it's probable that this problem affects also them.

Regards

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="test.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.zip"

UEsDBBQAAgAIAEcuV0M4jUmDBgAAAMgAAAAJAAAAdGVzdDEudHh0MzQcHgAAUEsDBBQAAgAIAFEu
V0OKn9KHBgAAAMgAAAAJAAAAdGVzdDIudHh0MzIaHgAAUEsBAhQAFAACAAgARy5XQziNSYMGAAAA
yAAAAAkAAAAAAAAAAQAgAAAAAAAAAHRlc3QxLnR4dFBLAQIUABQAAgAIAFEuV0OKn9KHBgAAAMgA
AAAJAAAAAAAAAAEAIAAAAC0AAAB0ZXN0Mi50eHRQSwUGAAAAAAIAAgBuAAAAWgAAAAAA
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I'm sorry but it's not possible to show the right files here, because the file offsets change (and I can't re-read the archive). Therefore I will have to block the modification of archives in this case.
Author of Total Commander
https://www.ghisler.com
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Well, TC just can't block modifying archives after closing search window - I can't imagine how this could be done...

And another instance of TC or even WinZip can also modify the file in the background.

Is this really impossible to read the archive again before opening it in Lister? It seems that TC has all required information - i.e. archive file name and packed file name.

Regards
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

29.10.13 Fixed: Search in archive, feed to listbox -> do not show archive contents if the archive was changed after starting the search (32/64)
I can confirm that this works as described in TC 32-bit.
03.11.13 Fixed: Switch to tab with previous search result from archive -> check whether the archive was modified after the search. If yes, return to normal view (32/64)
I can confirm that this works as described in TC 32-bit.
03.11.13 Fixed: Refuse to copy/delete/view/edit files from archive search results if the archive was modified since it was opened (32/64)
Well, I must admit that I don't understand this description, i.e. I don't know how to try to reproduce this behavior.



However, I can NOT confirm the fix for the problem that I described, although there is a small change.

I exactly reproduced steps described above as "Problem 1" and "Problem 2", with test.zip attached there, with Beta 8. TC still doesn't work properly: now, instead of error messages, that are described in step 13) in "Problem 1" and "Problem 2", in both cases TC displays an error: "Disk read error!".

Regards
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2MarcinW
TC now shows "Disk read error!" when it refuses to read from the ZIP because it was changed. This is a precaution to avoid that the wrong data is read.
Author of Total Commander
https://www.ghisler.com
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Ok - so I can confirm that the problem is fixed.

And my favor is: please change in the future the error message to something like "Can't show archive contents, because archive has changed".

Regards
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

That would be ideal - but not an option since it takes several months to get all translations, and I have already contacted all translators.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4626
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:That would be ideal - but not an option since it takes several months to get all translations, and I have already contacted all translators.
Then, can you add it to the wish list for a later version?
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

So it seems that the best solution for now would be to add a new string for this case, with same message text as now - so this could be changed easily in the future.

Regards
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

MarcinW wrote:please change in the future the error message to something like "Can't show archive contents, because archive has changed"
ghisler(Author) wrote:That would be ideal - but not an option since it takes several months to get all translations, and I have already contacted all translators.
Maybe now would be a good time to make this change?

Regards
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Good idea, added to the to-do list.
Author of Total Commander
https://www.ghisler.com
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

29.06.16 Fixed: Search in zip, feed to listbox, delete a file -> show more meaningful error when user tries to view/edit a file (32/64)
As far as I tested, this is not for the problem described above?
Post Reply