Mercurial > emacs
changeset 61944:beaf4d3d5cbf
(backup-buffer-copy): Use copy-file instead
of write-region, and put back the 'excl.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 30 Apr 2005 20:14:32 +0000 |
parents | 26bd7a854809 |
children | a6e35466de6b |
files | lisp/files.el |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Sat Apr 30 20:13:39 2005 +0000 +++ b/lisp/files.el Sat Apr 30 20:14:32 2005 +0000 @@ -2761,14 +2761,12 @@ (condition-case nil (delete-file to-name) (file-error nil)) - (write-region "" nil to-name nil 'silent nil 'excl) + (copy-file from-name to-name t t 'excl) nil) (file-already-exists t)) - ;; the file was somehow created by someone else between - ;; `make-temp-name' and `write-region', let's try again. - nil) -; (copy-file from-name to-name t t 'excl)) - (copy-file from-name to-name t t)) + ;; The file was somehow created by someone else between + ;; `delete-file' and `copy-file', so let's try again. + nil)) ;; Reset the umask. (set-default-file-modes umask))) (and modes