]> git.ipfire.org Git - thirdparty/coreutils.git/commit
rm: don’t assume st_size is nonnegative
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 23 Jul 2022 19:11:49 +0000 (12:11 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 23 Jul 2022 19:17:44 +0000 (12:17 -0700)
commit8ec11f3e7220fc84c5c019e91a58253d838c89a8
tree6786fef80d5359b6acd5fa1f2c0ca5114008952e
parent116ac656e78ab6c6b3b005ec8c994e74812a4043
rm: don’t assume st_size is nonnegative

* src/remove.c: Include stat-time.h.
(cache_fstatat, cache_stat_init): Use negative st->st_atim.tv_sec to
determine whether the stat is cached, not negative st->st_size.
On non-POSIX platforms that lack st_atim.tv_sec, don’t bother to cache.
src/remove.c