diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-12-11 00:29:18 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-12-11 00:29:18 +0000 |
commit | 6a3520ad670377763682f04e2707c6495fc6ab5f (patch) | |
tree | 98aceb391ab786389f8b234bad391f5c8a00a52d /src | |
parent | 5d4fbbf34180d3b098b9974f145d5606ac8b7d2d (diff) | |
download | emacs-6a3520ad670377763682f04e2707c6495fc6ab5f.tar.gz |
(Fwrite_region): Be careful not to destroy contents of
existing file when appending.
Diffstat (limited to 'src')
-rw-r--r-- | src/fileio.c | 2 |
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.") 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 */ { |