Commit ef429633 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Fwrite_region): Be careful not to destroy contents of

existing file when appending.
parent 79dc9431
...@@ -3536,7 +3536,7 @@ to the file, instead of any buffer contents, and END is ignored.") ...@@ -3536,7 +3536,7 @@ to the file, instead of any buffer contents, and END is ignored.")
desc = open (fn, O_WRONLY); desc = open (fn, O_WRONLY);
#endif /* not DOS_NT */ #endif /* not DOS_NT */
if (desc < 0) if (desc < 0 && (NILP (append) || errno == ENOENT) )
#ifdef VMS #ifdef VMS
if (auto_saving) /* Overwrite any previous version of autosave file */ if (auto_saving) /* Overwrite any previous version of autosave file */
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment