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:
parent
79dc9431d8
commit
ef4296336d
1 changed files with 1 additions and 1 deletions
|
|
@ -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 */
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue