changeset 2:2a27eaa6a6c7

Re #311: can't read ZIP file packed by Linux app Archive Manager/File Roller * Add mask to version to ignore Unix flag. (also suggested in http://community.sharpdevelop.net/forums/t/11466.aspx)
author IBBoard <dev@ibboard.co.uk>
date Sat, 30 Oct 2010 14:05:27 +0000
parents 94e25b786321
children 686f96c8b694
files Zip/ZipFile.cs
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/Zip/ZipFile.cs	Sat Oct 30 14:03:17 2010 +0000
     1.2 +++ b/Zip/ZipFile.cs	Sat Oct 30 14:05:27 2010 +0000
     1.3 @@ -1072,6 +1072,9 @@
     1.4  					}
     1.5  				}
     1.6  
     1.7 +				//Mask the version to read the lower (Zip version) bit so that OS compatibility is ignored (Zip standard, section J). We don't do anything with the extra data anyway
     1.8 +				extractVersion &= 0xFF;
     1.9 +
    1.10  				if ( testData ) {
    1.11  					if ( entry.IsFile ) {
    1.12  						if ( !entry.IsCompressionMethodSupported() ) {