diff options
author | Narayan Kamath <narayan@google.com> | 2015-02-23 14:09:31 +0000 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2015-02-27 12:58:16 +0000 |
commit | 9c0f5d6b348e37533bdcccf1166d6cbf1ca5c50b (patch) | |
tree | 06fe7482daa63cd42c06466f5cab8a7c64949700 /minzip/Zip.h | |
parent | 670a0c6fe945f20ab00205ce241d4804e45e0150 (diff) | |
download | bootable_recovery-9c0f5d6b348e37533bdcccf1166d6cbf1ca5c50b.zip bootable_recovery-9c0f5d6b348e37533bdcccf1166d6cbf1ca5c50b.tar.gz bootable_recovery-9c0f5d6b348e37533bdcccf1166d6cbf1ca5c50b.tar.bz2 |
Remove more dead code from minzip.
I've added explanatory comments to mzExtractRecursive because
that function will live on as a utility even after we move the
zip format related logic to libziparchive.
bug: 19472796
(cherry-picked from commit c9ccdfd7a42de08c47ab771b94dc5b9d1f957b95)
Change-Id: I8b7fb6fa3eafb2e7ac080ef7a7eceb691b252d8a
Diffstat (limited to 'minzip/Zip.h')
-rw-r--r-- | minzip/Zip.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/minzip/Zip.h b/minzip/Zip.h index 54eab32..a2b2c26 100644 --- a/minzip/Zip.h +++ b/minzip/Zip.h @@ -143,9 +143,12 @@ bool mzExtractZipEntryToBuffer(const ZipArchive *pArchive, const ZipEntry *pEntry, unsigned char* buffer); /* - * Inflate all entries under zipDir to the directory specified by + * Inflate all files under zipDir to the directory specified by * targetDir, which must exist and be a writable directory. * + * Directory entries and symlinks are not extracted. + * + * * The immediate children of zipDir will become the immediate * children of targetDir; e.g., if the archive contains the entries * @@ -160,21 +163,15 @@ bool mzExtractZipEntryToBuffer(const ZipArchive *pArchive, * /tmp/two * /tmp/d/three * - * flags is zero or more of the following: - * - * MZ_EXTRACT_FILES_ONLY - only unpack files, not directories or symlinks - * MZ_EXTRACT_DRY_RUN - don't do anything, but do invoke the callback - * * If timestamp is non-NULL, file timestamps will be set accordingly. * * If callback is non-NULL, it will be invoked with each unpacked file. * * Returns true on success, false on failure. */ -enum { MZ_EXTRACT_FILES_ONLY = 1, MZ_EXTRACT_DRY_RUN = 2 }; bool mzExtractRecursive(const ZipArchive *pArchive, const char *zipDir, const char *targetDir, - int flags, const struct utimbuf *timestamp, + const struct utimbuf *timestamp, void (*callback)(const char *fn, void*), void *cookie, struct selabel_handle *sehnd); |