comparison lisp/files.el @ 78648:919ee0e1f2e3

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:09:33 +0000
parents f307172b344d
children 73d0aca5f90c
comparison
equal deleted inserted replaced
78647:fd75232a4a2c 78648:919ee0e1f2e3
3129 ;; loosen them later, whereas it's impossible to close the 3129 ;; loosen them later, whereas it's impossible to close the
3130 ;; time-window of loose permissions otherwise. 3130 ;; time-window of loose permissions otherwise.
3131 (set-default-file-modes ?\700) 3131 (set-default-file-modes ?\700)
3132 (while (condition-case () 3132 (while (condition-case ()
3133 (progn 3133 (progn
3134 (condition-case nil 3134 (and (file-exists-p to-name)
3135 (delete-file to-name) 3135 (delete-file to-name))
3136 (file-error nil))
3137 (copy-file from-name to-name nil t) 3136 (copy-file from-name to-name nil t)
3138 nil) 3137 nil)
3139 (file-already-exists t)) 3138 (file-already-exists t))
3140 ;; The file was somehow created by someone else between 3139 ;; The file was somehow created by someone else between
3141 ;; `delete-file' and `copy-file', so let's try again. 3140 ;; `delete-file' and `copy-file', so let's try again.