Fix broken time comparison.
This change fixes a broken check that excludes all recent tombstones
and ANRs and only preserves old ones. Luckily, limit_by_mtime is only
true for flat (non-zipped) bug reports so we haven't seen this too
often in practice.
Test: manual
Bug: 73759506
Change-Id: Ic7856a4a1f5af3b1d5c5becb7bc83d2def4a71ea
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index a641dbb..8258c45 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -180,7 +180,7 @@
continue;
}
- if (limit_by_mtime && st.st_mtime >= thirty_minutes_ago) {
+ if (limit_by_mtime && st.st_mtime < thirty_minutes_ago) {
MYLOGI("Excluding stale dump file: %s\n", abs_path.c_str());
continue;
}