From 95522746457a6410f8efc42f7473623f7395d1d3 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 9 Mar 2001 12:40:47 +0000 Subject: [PATCH] (Fwrite_region) [DOS_NT]: Remove O_TRUNC from open flags argument to emacs_open; it seems to conflict with O_EXCL. --- src/ChangeLog | 5 +++++ src/fileio.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 14e557e3827..68964536ae7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-03-09 Gerd Moellmann + + * fileio.c (Fwrite_region) [DOS_NT]: Remove O_TRUNC from open + flags argument to emacs_open; it seems to conflict with O_EXCL. + 2001-03-09 Kenichi Handa * composite.h (struct composition): Change types of members; diff --git a/src/fileio.c b/src/fileio.c index dc087873988..fb40e549710 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4684,8 +4684,8 @@ This does code conversion according to the value of\n\ #else /* not VMS */ #ifdef DOS_NT desc = emacs_open (fn, - O_WRONLY | O_TRUNC | O_CREAT | buffer_file_type - | (mustbenew == Qexcl ? O_EXCL : 0), + O_WRONLY | O_CREAT | buffer_file_type + | (EQ (mustbenew, Qexcl) ? O_EXCL : O_TRUNC), S_IREAD | S_IWRITE); #else /* not DOS_NT */ desc = emacs_open (fn, O_WRONLY | O_TRUNC | O_CREAT -- 2.39.5