summaryrefslogtreecommitdiff
path: root/include/ziparchive/zip_archive.h
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2013-12-13 16:06:19 +0000
committerNarayan Kamath <narayan@google.com>2013-12-13 17:56:57 +0000
commit00a258cec7bbecf10e04fef7ed4781cd750ba1d8 (patch)
tree95c319d797685fc31fa2b88b3550368b6f3d1b2e /include/ziparchive/zip_archive.h
parenta67b39cb612744764ad9cd9a78aabd6b5742a384 (diff)
Fix ExtractEntryToFile.
We would always write uncompressed data at offset 0 instead of the current filedescriptor offset. Also adds a unit-test & a clarifying comment on the API. Change-Id: If44757e96dde504ce63d81b4dec7115fc6f6d5fb
Diffstat (limited to 'include/ziparchive/zip_archive.h')
-rw-r--r--include/ziparchive/zip_archive.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/ziparchive/zip_archive.h b/include/ziparchive/zip_archive.h
index ac3d79288..18774948f 100644
--- a/include/ziparchive/zip_archive.h
+++ b/include/ziparchive/zip_archive.h
@@ -152,7 +152,10 @@ int32_t StartIteration(ZipArchiveHandle handle, void** cookie_ptr,
int32_t Next(void* cookie, ZipEntry* data, ZipEntryName *name);
/*
- * Uncompress and write an entry to a file descriptor.
+ * Uncompress and write an entry to an open file identified by |fd|.
+ * |entry->uncompressed_length| bytes will be written to the file at
+ * its current offset, and the file will be truncated at the end of
+ * the uncompressed data.
*
* Returns 0 on success and negative values on failure.
*/