1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-05-02 03:00:56 -07:00

(Fwrite_region): Be careful not to destroy contents of

existing file when appending.
This commit is contained in:
Richard M. Stallman 1996-12-11 00:29:18 +00:00
parent 79dc9431d8
commit ef4296336d

View file

@ -3536,7 +3536,7 @@ to the file, instead of any buffer contents, and END is ignored.")
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 */
{