]> code.delx.au - gnu-emacs/commit
Avoid file time stamp bug on MS-Windows.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 2 Feb 2013 19:18:00 +0000 (11:18 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 2 Feb 2013 19:18:00 +0000 (11:18 -0800)
commit8ea41ea99608c7483ef5c91e230a760cf90bfb54
treea3cb2538ecd6f106b6e55c4d4c76be1487b01431
parente7ac588e198385a9bc5a2338000ab6db69c2353c
Avoid file time stamp bug on MS-Windows.

* fileio.c (Fwrite_region): Don't use the heuristic on empty files,
as FAT32 doesn't update time stamps when truncating them.
Also, check that a file time stamp is not a multiple of 100 ns;
this should catch all instances of the problem on MS-Windows,
as its native file system resolution is 100 ns or worse, and
checking for a non-multiple of 100 ns should impose only a small
overhead on systems with ns resolution.

Fixes: debbugs:13149
src/ChangeLog
src/fileio.c