summaryrefslogtreecommitdiff
path: root/tools/aapt/Package.cpp
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-12-17 10:52:59 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2024-12-17 10:52:59 -0800
commit385afaff33c45c26169bf286c24c57eaf968379e (patch)
tree01179ccad81074fa065add8ebb57fd232167d12b /tools/aapt/Package.cpp
parente3d690abf42511593f954544c2ea47d91ebdbab6 (diff)
parent5f0df423bf9aeb8879354a178848578b30f82c65 (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.cpp11
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());