Determine isDirectory by "Folder = " field in 7z plugin
Summary: 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. Test Plan: Rebuilt ark and tried on some zip archives (also on the archive that ark was unable to display properly). Everything works OK. Reviewers: elvisangelaccio Reviewed By: elvisangelaccio Subscribers: elvisangelaccio, kde-utils-devel, #ark Tags: #ark Differential Revision: https://phabricator.kde.org/D18562
parent
6b72fca2
Please register or sign in to comment