]> git.eshelyaron.com Git - emacs.git/commitdiff
Ulrich Mueller <ulm at gentoo.org> (tiny change)
authorGlenn Morris <rgm@gnu.org>
Fri, 24 Aug 2007 03:09:33 +0000 (03:09 +0000)
committerGlenn Morris <rgm@gnu.org>
Fri, 24 Aug 2007 03:09:33 +0000 (03:09 +0000)
(backup-buffer-copy): Don't wrap delete in condition-case, only try to
delete if file exists.

lisp/files.el

index dab90097119b7c67abca163f44d51a9b26078cd0..84aa78b4a521239f1cb0bca9cec7b1a13cebf4f8 100644 (file)
@@ -3131,9 +3131,8 @@ BACKUPNAME is the backup file name, which is the old file renamed."
          (set-default-file-modes ?\700)
          (while (condition-case ()
                     (progn
-                      (condition-case nil
-                          (delete-file to-name)
-                        (file-error nil))
+                      (and (file-exists-p to-name)
+                           (delete-file to-name))
                       (copy-file from-name to-name nil t)
                       nil)
                   (file-already-exists t))