aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-12-11 00:29:18 +0000
committerRichard M. Stallman1996-12-11 00:29:18 +0000
commitef4296336d3d6770b1fe09ad7b7bdb17a9fd0c68 (patch)
tree9e2b24cab8f43079958e81253b452f1327bea4ac /src
parent79dc9431d8a925a5aa4b4d1023d26c188da9338a (diff)
downloademacs-ef4296336d3d6770b1fe09ad7b7bdb17a9fd0c68.tar.gz
emacs-ef4296336d3d6770b1fe09ad7b7bdb17a9fd0c68.zip
(Fwrite_region): Be careful not to destroy contents of
existing file when appending.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index d8c0f263b3e..20419fe394a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3536,7 +3536,7 @@ to the file, instead of any buffer contents, and END is ignored.")
3536 desc = open (fn, O_WRONLY); 3536 desc = open (fn, O_WRONLY);
3537#endif /* not DOS_NT */ 3537#endif /* not DOS_NT */
3538 3538
3539 if (desc < 0) 3539 if (desc < 0 && (NILP (append) || errno == ENOENT) )
3540#ifdef VMS 3540#ifdef VMS
3541 if (auto_saving) /* Overwrite any previous version of autosave file */ 3541 if (auto_saving) /* Overwrite any previous version of autosave file */
3542 { 3542 {