To reproduce:
1. Open TC with fresh ini-file.
2. Set Options -> Zip packer -> Set ZIP date to newest file date.
3. Create a dir "test" in the left panel and make 3 files in it: "1.c", "2.b" and "3.a"
4. Open another dir in the right panel and set the sort order for that panel to UNSORTED (Ctrl+F7).
5. Mark the three files in the LEFT panel and pack them to test.zip in the opposite panel (Alt+F5).
6. Open the newly created test.zip file in the RIGHT panel - the order is "1.c", "2.b", "3.a" as expected.
7. Rename the test.zip file to testold.zip.
8. Change the sort order in the LEFT panel to Extension. (Ctrl+F4).
9. Mark the three files again and pack them to test.zip in the opposite panel (Alt+F5).
10. Open the newly created test.zip file in the RIGHT panel - the order is STILL "1.c", "2.b", "3.a" - not expected!
11. Open textold.zip and exit it again.
12. Open test.zip again - now the sort order is "3.a", "2.b", "1.c" as expected.
It doesn't matter what archive you open in step 11 - it can also be for example a rar archive. But somehow TC remembers the previous sorting until another archive has been opened.
If I at step 9 pack one more file than at the first packing - the the bug doesn't occur. It seems that it only happens when the content (except for the file order) is the same as when I packed the files the first time.
If I disable "Set ZIP date to newest file date" everything works as expected. I looks like TC checks the date (and probably the size) of the zip file and when it is the same as the last time a file with that name, date and size was opened it uses the same sorting, even though it is not the same file. If I copy the secondly made text.zip to another directory the order is also show correctly (in unsorted view).
If have opened the file as in step 10 (showing the wrong sort order), then deleting a file inside the archive doesn't change the view, but if I disable "Set ZIP date to newest file date" before I delete a file in the archive then the view order is reset to the correct order.
[TC8.0 and 7.56] Sort order in archives seems to be cached
Moderators: Hacker, petermad, Stefan2, white
[TC8.0 and 7.56] Sort order in archives seems to be cached
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 50861
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, the file names and details of the last opened archive are cached and re-used when name, size and timestamp are the same. This is crutial when using large archives. Therefore I will not change this behaviour, sorry.I looks like TC checks the date (and probably the size) of the zip file and when it is the same as the last time a file with that name, date and size was opened it uses the same sorting, even though it is not the same file.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com