Mercurial > emacs
diff src/fileio.c @ 16662:d3d202f71430
(Fwrite_region): Be careful not to destroy contents of
existing file when appending.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 11 Dec 1996 00:29:18 +0000 |
parents | e7449d679e72 |
children | 7df45948d2d8 |
line wrap: on
line diff
--- a/src/fileio.c Tue Dec 10 23:29:51 1996 +0000 +++ b/src/fileio.c Wed Dec 11 00:29:18 1996 +0000 @@ -3536,7 +3536,7 @@ desc = open (fn, O_WRONLY); #endif /* not DOS_NT */ - if (desc < 0) + if (desc < 0 && (NILP (append) || errno == ENOENT) ) #ifdef VMS if (auto_saving) /* Overwrite any previous version of autosave file */ {