Fix timestamp bug when write-region appends nothing.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Feb 2013 20:51:12 +0000 (12:51 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Feb 2013 20:51:12 +0000 (12:51 -0800)
commit35e854998e2ab2155875683411beb0518236da18
tree21bff62f619f3f3568bed3d0ed3cc9727b53503d
parentaf314ba001f576c59dcc2df8506b34cdf12b5c63
Fix timestamp bug when write-region appends nothing.

* fileio.c (Fwrite_region): When neither O_EXCL nor O_TRUNC is used,
the file's time stamp doesn't change if Emacs happens to write nothing
to the file, and on a buggy file system this could cause Emacs to
incorrectly infer that the file system doesn't have the bug.
Avoid this problem by inhibiting the inference in this case.

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