# HG changeset patch # User IBBoard # Date 1288447527 0 # Node ID 2a27eaa6a6c7e521e497e805f8afe46f96efe3ff # Parent 94e25b7863211e83a75f4af1199d77d204bf8928 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) diff -r 94e25b786321 -r 2a27eaa6a6c7 Zip/ZipFile.cs --- a/Zip/ZipFile.cs Sat Oct 30 14:03:17 2010 +0000 +++ b/Zip/ZipFile.cs Sat Oct 30 14:05:27 2010 +0000 @@ -1072,6 +1072,9 @@ } } + //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 + extractVersion &= 0xFF; + if ( testData ) { if ( entry.IsFile ) { if ( !entry.IsCompressionMethodSupported() ) {