]> git.eshelyaron.com Git - emacs.git/commitdiff
(backup-buffer-copy): If MODES is nil, don't set modes.
authorRichard M. Stallman <rms@gnu.org>
Mon, 29 Dec 2003 19:14:03 +0000 (19:14 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 29 Dec 2003 19:14:03 +0000 (19:14 +0000)
lisp/files.el

index ce4d67d33e432d2e0cf9a3e2341ddcb2e1e1effd..4983b1287e8e633639355362c9ea18e5ae6c4aea 100644 (file)
@@ -2552,7 +2552,8 @@ BACKUPNAME is the backup file name, which is the old file renamed."
              (not (file-writable-p to-name)))
         (delete-file to-name))
      (copy-file from-name to-name t t)))
-  (set-file-modes to-name (logand modes #o1777)))
+  (and modes
+       (set-file-modes to-name (logand modes #o1777))))
 
 (defun file-name-sans-versions (name &optional keep-backup-version)
   "Return file NAME sans backup versions or strings.