Fix mtime/ctime bug

[apenwarr's note: ctime includes extra inode attributes like link
count, which are not important for this check, but which could cause
spurious warnings.]
This commit is contained in:
Robert L. Bocchino Jr 2016-11-27 10:31:19 -08:00 committed by Avery Pennarun
commit f739a0fc6e

View file

@ -236,7 +236,7 @@ class BuildJob:
st1 = os.fstat(f.fileno())
st2 = _try_stat(self.tmpname2)
if (after_t and
(not before_t or before_t.st_ctime != after_t.st_ctime) and
(not before_t or before_t.st_mtime != after_t.st_mtime) and
not stat.S_ISDIR(after_t.st_mode)):
err('%s modified %s directly!\n' % (self.argv[2], t))
err('...you should update $3 (a temp file) or stdout, not $1.\n')