From f739a0fc6eddacba1207f755fb4fa008d4fb5748 Mon Sep 17 00:00:00 2001 From: "Robert L. Bocchino Jr" Date: Sun, 27 Nov 2016 10:31:19 -0800 Subject: [PATCH] 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.] --- builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder.py b/builder.py index e3c9df7..3dfe66f 100644 --- a/builder.py +++ b/builder.py @@ -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')