On 7/9/19 12:12 PM, k...@plushkava.net wrote: >> The code just returns (atime <= mtime), and has since 1997. It uses the >> st_atime and st_mtime fields. I should update it to use timespecs if >> they're available, and (mtime > atime) might work closer to your >> expectations. >> >> After the call to mktemp, the atime and mtime are the same, so the test >> returns true. > > I see. Indeed, it is confusing to me because I would not consider a file > whose atime and mtime are equal to have been "modified since it was last > read", notwithstanding that the newborn file has not yet been read at all. I > think that it would help for the documentation to address this nuance. > > As for the possibility of using the timespec fields, that would be terrific.
That's already done. And we'll try the (mtime > atime) variant as well. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/