diff options
| author | 2024-12-17 10:52:59 -0800 | |
|---|---|---|
| committer | 2024-12-17 10:52:59 -0800 | |
| commit | 385afaff33c45c26169bf286c24c57eaf968379e (patch) | |
| tree | 01179ccad81074fa065add8ebb57fd232167d12b /tools/aapt/Package.cpp | |
| parent | e3d690abf42511593f954544c2ea47d91ebdbab6 (diff) | |
| parent | 5f0df423bf9aeb8879354a178848578b30f82c65 (diff) | |
Merge "Revert^2 "[res] Better modification time resolution in Idmap"" into main
Diffstat (limited to 'tools/aapt/Package.cpp')
| -rw-r--r-- | tools/aapt/Package.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/aapt/Package.cpp b/tools/aapt/Package.cpp index 5e0f87f0dcaf..60c4bf5c4131 100644 --- a/tools/aapt/Package.cpp +++ b/tools/aapt/Package.cpp @@ -292,13 +292,12 @@ bool processFile(Bundle* bundle, ZipFile* zip, } if (!hasData) { const String8& srcName = file->getSourceFile(); - time_t fileModWhen; - fileModWhen = getFileModDate(srcName.c_str()); - if (fileModWhen == (time_t) -1) { // file existence tested earlier, - return false; // not expecting an error here + auto fileModWhen = getFileModDate(srcName.c_str()); + if (fileModWhen == kInvalidModDate) { // file existence tested earlier, + return false; // not expecting an error here } - - if (fileModWhen > entry->getModWhen()) { + + if (toTimeT(fileModWhen) > entry->getModWhen()) { // mark as deleted so add() will succeed if (bundle->getVerbose()) { printf(" (removing old '%s')\n", storageName.c_str()); |