changeset 82807:1fbf8f4df1a7

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.
author Glenn Morris <rgm@gnu.org>
date Fri, 24 Aug 2007 03:08:13 +0000
parents 9f65c637f6d3
children 6e5814967ffb
files lisp/files.el
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Fri Aug 24 03:07:45 2007 +0000
+++ b/lisp/files.el	Fri Aug 24 03:08:13 2007 +0000
@@ -3183,9 +3183,8 @@
 	  (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))