diff options
author | Tor Norbye <tnorbye@google.com> | 2015-10-30 20:00:13 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2015-10-30 20:00:13 -0700 |
commit | b3559643b946829933a76ed45750d13edfefad30 (patch) | |
tree | 6c948f303d0250926b1ccabe24f1d4319a4bf874 /tools/aapt/ZipFile.cpp | |
parent | f789ef7e381ea57a4f515fde470d40f93bc5f345 (diff) |
Don't set modification times in aapt zip entries
Use a modification timestamp of 0 for all files
inside the zip archive to make the build repeatable.
Change-Id: Ie6e57329469b99c6f93cb0a6083e0c402be99815
Diffstat (limited to 'tools/aapt/ZipFile.cpp')
-rw-r--r-- | tools/aapt/ZipFile.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/aapt/ZipFile.cpp b/tools/aapt/ZipFile.cpp index 36f4e73b3ac2..2840826c32a6 100644 --- a/tools/aapt/ZipFile.cpp +++ b/tools/aapt/ZipFile.cpp @@ -364,7 +364,7 @@ status_t ZipFile::addCommon(const char* fileName, const void* data, size_t size, long lfhPosn, startPosn, endPosn, uncompressedLen; FILE* inputFp = NULL; unsigned long crc; - time_t modWhen; + time_t modWhen = 0; if (mReadOnly) return INVALID_OPERATION; @@ -497,7 +497,6 @@ status_t ZipFile::addCommon(const char* fileName, const void* data, size_t size, */ pEntry->setDataInfo(uncompressedLen, endPosn - startPosn, crc, compressionMethod); - modWhen = getModTime(inputFp ? fileno(inputFp) : fileno(mZipFp)); pEntry->setModWhen(modWhen); pEntry->setLFHOffset(lfhPosn); mEOCD.mNumEntries++; |