Skip to content

Commit

Permalink
Consider Zip entries with file type bits set to 0 as files
Browse files Browse the repository at this point in the history
  • Loading branch information
sorich87 committed Aug 30, 2023
1 parent d19b2d5 commit 59378dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/shared/lib/src/zip/lazy_zip_decoder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class LazyZipDecoder {
// UNIX systems has a creator version of 3 decimal at 1 byte offset
if (zfh.versionMadeBy >> 8 == 3) {
//final bool isDirectory = file.mode & 0x7000 == 0x4000;
final bool isFile = file.mode & 0x3F000 == 0x8000;
file.isFile = isFile;
final fileType = file.mode & 0xF000;
file.isFile = fileType == 0x8000 || fileType == 0x0000;
} else {
file.isFile = !file.name.endsWith('/');
}
Expand Down

0 comments on commit 59378dc

Please sign in to comment.