changeset 61789:f1787300a867

(Fcopy_file): Doc fix. [MSDOS]: Fix call to emacs_open: buffer_file_type not defined and not needed.
author Eli Zaretskii <eliz@gnu.org>
date Sun, 24 Apr 2005 09:18:15 +0000
parents 08e27aad5ae3
children 161d3be3c6f9
files src/fileio.c
diffstat 1 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Sun Apr 24 06:07:40 2005 +0000
+++ b/src/fileio.c	Sun Apr 24 09:18:15 2005 +0000
@@ -2400,14 +2400,15 @@
 
 Fourth arg KEEP-TIME non-nil means give the output file the same
 last-modified time as the old one.  (This works on only some systems.)
+
+A prefix arg makes KEEP-TIME non-nil.
+
 The optional fifth arg MUSTBENEW, if non-nil, insists on a check
-  for an existing file with the same name.  If MUSTBENEW is `excl',
-  that means to get an error if the file already exists; never overwrite.
-  If MUSTBENEW is neither nil nor `excl', that means ask for
-  confirmation before overwriting, but do go ahead and overwrite the file
-  if the user confirms.
-
-A prefix arg makes KEEP-TIME non-nil.  */)
+for an existing file with the same name.  If MUSTBENEW is `excl',
+that means to get an error if the file already exists; never overwrite.
+If MUSTBENEW is neither nil nor `excl', that means ask for
+confirmation before overwriting, but do go ahead and overwrite the file
+if the user confirms.  */)
   (file, newname, ok_if_already_exists, keep_time, mustbenew)
      Lisp_Object file, newname, ok_if_already_exists, keep_time, mustbenew;
 {
@@ -2529,8 +2530,8 @@
 #ifdef MSDOS
   /* System's default file type was set to binary by _fmode in emacs.c.  */
   ofd = emacs_open (SDATA (encoded_newname),
-		    O_WRONLY | O_CREAT | buffer_file_type
-		    | (EQ (mustbenew, Qexcl) ? O_EXCL : O_TRUNC),
+		    O_WRONLY | O_TRUNC | O_CREAT
+		    | (EQ (mustbenew, Qexcl) ? O_EXCL : 0),
 		    S_IREAD | S_IWRITE);
 #else  /* not MSDOS */
   ofd = emacs_open (SDATA (encoded_newname),