aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/files.el
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2007-08-24 03:08:13 +0000
committerGlenn Morris <[email protected]>2007-08-24 03:08:13 +0000
commitbb1f0d92c29e2465d1d18eaf3a7bbfcf8a8f0d6b (patch)
tree0f6d23579cd57f28dacf1f933ba48e887fe3a34a /lisp/files.el
parent46b0d02912eaa28fa244a17abbed2d6ee2d8ce33 (diff)
Ulrich Mueller <ulm at gentoo.org> (tiny change)
(backup-buffer-copy): Don't wrap delete in condition-case, only try to delete if file exists.
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 614cad467e..be3c53951c 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3183,9 +3183,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))