diff options
author | Damien Martin-Guillerez <dmarting@google.com> | 2015-06-01 14:45:21 +0000 |
---|---|---|
committer | Philipp Wollermann <philwo@google.com> | 2015-06-01 15:50:49 +0000 |
commit | eb6e90397eff1083f0574b6cbd94eb9f42d2d239 (patch) | |
tree | 7eac158033f6db031ea5ac167f75fd3ff800c4a1 /third_party/ijar/zip.h | |
parent | 14b437bf749baf0488cfc7e4ed7589dc4af9bec3 (diff) |
Use the ijar ZIP implementation in Blaze instead of libarchive
This ZIP implementation is lightweight and rely on zlib for
compression. libarchive was a bit tricky to set-up so it's
better to use that one.
--
Change-Id: I607b492998572e834e095a4606eeb77c0b574542
Reviewed-on: https://bazel-review.googlesource.com/#/c/1410/
MOS_MIGRATED_REVID=94910072
Diffstat (limited to 'third_party/ijar/zip.h')
-rw-r--r-- | third_party/ijar/zip.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/third_party/ijar/zip.h b/third_party/ijar/zip.h index 97a8e28af2..046072d25a 100644 --- a/third_party/ijar/zip.h +++ b/third_party/ijar/zip.h @@ -26,6 +26,11 @@ namespace devtools_ijar { +// Tells if this is a directory entry from the mode. This method +// is safer than zipattr_to_mode(attr) & S_IFDIR because the unix +// mode might not be set in DOS zip files. +inline bool zipattr_is_dir(u4 attr) { return (attr & 0x10) != 0; } + // Convert a Unix file mode to a ZIP file attribute inline u4 mode_to_zipattr(mode_t m) { return (((u4) m) << 16) + ((m & S_IFDIR) != 0 ? 0x10 : 0); |