After looking at 7zip sources, I've found that there are two types of file attributes:
- FAT/Windows (e. g. "RA", "RDA")
- Unix (e. g. "_ -rwxr-xr-x" or "D_ drwxr-xr-x")
Earlier, isDirectory property was determined by "Attributes = " field. But this is incorrect, when 7z returns strings like
"Attributes = RDA"
This is a directory, but the code searched for "D" in the beginning and failed. Due to that, the archive couldn't be displayed properly.
I used a more canonical way to determine isDirectory: parsing "Folder = " field in 7z's output. Also reworked handling "Attributes = " field to handle both cases correctly.