# HG changeset patch # User Richard M. Stallman # Date 850264158 0 # Node ID d3d202f7143005e3f8e2c3d460f5239760102556 # Parent 22c70a622b6709c50778248dac6178508219957e (Fwrite_region): Be careful not to destroy contents of existing file when appending. diff -r 22c70a622b67 -r d3d202f71430 src/fileio.c --- a/src/fileio.c Tue Dec 10 23:29:51 1996 +0000 +++ b/src/fileio.c Wed Dec 11 00:29:18 1996 +0000 @@ -3536,7 +3536,7 @@ 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 */ {