I updated and bug fixed the 7zip plugins, and I found a bug that TC should fix it.
When extracting a zip by TC internal zip packer, TC will restore the attributes of the DIR, that is correct to keep the attributes be the same as the attributes information stored in zip file.
When extracting an archive file by packer plugins(like Total7zip or 7zip plugins), TC will NOT restore the attributes of the DIR, and this is a bug.
reproducing the bug:
1. install Total7zip or 7zip plugins.
2. donwload test files ROOT0401.7Z and ROOT0401_7z.zip
3. using TC to view the content of these two archived file, including the attributes of the DIR, they are the same.
4. Cursor to ROOT0401_7z.zip press Enter, and then select a test target directory to extract it. You will see that the attributes of the DIR are the same as the archive file ROOT0401_7z.zip.
5. Curosr to ROOT0401.7Z press Enter, and then select a different test target directory to extract it. You will see that the attributes of all DIRs are removed!!
If you using XP buildin zip function to extract ROOT0401_7z.zip, XP will also restore the attributes of the DIR.
If you using WinRAR or 7z File Manager to extract these two test files, they will also restore the attributes of the DIR.
When I debug the 7zip plugins during extracting ROOT0401.7Z, I found TC will call ProcessFile() and using PK_SKIP for DIRs, the packer can only return the attributes of the DIR when TC calling ReadHeader()/ReadHeaderEx().
When extracting files, TC will create to target DIR and then call ProcessFile() with PK_EXTRACT for files , and if you set
Configuration -> Copy/Delete -> [v] Copy date/time of directories
TC will restore the date/time of directories, but for current verstion(7.56a), TC will not restore the attributes of directories.
Please fix the bug, thanks.
DIR attributes need to be assigned when using packer plugins
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I will check that, thanks. Does it depend on the order in which the directories are stored inside the archives? TC doesn't "unpack" a folder if it's already there.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
For further testing:
1. creating a DIR name it to TEST
2. set this Empty TEST DIR attributes to "Hidden" and "System"
3. pack this Empty TEST DIR by 7zip or Total7zip to TEST.7z
4. Cursor to TEST.7z and press Enter, the DIR attributes is "Hidden" and "System".
5. Extract TEST.7z to some other target directory, the output TEST dir will have no attributes at all.
If you using the internal zip packer to do the above testing, internal zip will add "Archive" attribute to the TEST dir in TEST.zip(another bug described in this post), and the extracted output TEST dir will have the same attributes as it in TEST.zip.
Does this test can show the dependence on the order of dir inside the archives?
Current 7zip plugins just reorder dir items of the 7z, I have tried to reorder all file/dir items, but it is fail to extract, maybe I will try it again.
1. creating a DIR name it to TEST
2. set this Empty TEST DIR attributes to "Hidden" and "System"
3. pack this Empty TEST DIR by 7zip or Total7zip to TEST.7z
4. Cursor to TEST.7z and press Enter, the DIR attributes is "Hidden" and "System".
5. Extract TEST.7z to some other target directory, the output TEST dir will have no attributes at all.
If you using the internal zip packer to do the above testing, internal zip will add "Archive" attribute to the TEST dir in TEST.zip(another bug described in this post), and the extracted output TEST dir will have the same attributes as it in TEST.zip.
Does this test can show the dependence on the order of dir inside the archives?
Current 7zip plugins just reorder dir items of the 7z, I have tried to reorder all file/dir items, but it is fail to extract, maybe I will try it again.
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact: