summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2007-08-24 03:03:33 +0000
committerGlenn Morris <rgm@gnu.org>2007-08-24 03:03:33 +0000
commit81422c92b924f3dae1e7c8ad0a0db8fff4d9139b (patch)
treeb9f8e1f87d4c71f9585668d924a5ddcf4cc6e966 /lisp/files.el
parent4a64b204da1a7b9beda84758baee187e11c9a355 (diff)
downloademacs-81422c92b924f3dae1e7c8ad0a0db8fff4d9139b.tar.gz
(backup-buffer-copy): Revert 2007-08-22 change.
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el10
1 files changed, 0 insertions, 10 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 8281a18b34f..dab90097119 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3123,9 +3123,6 @@ BACKUPNAME is the backup file name, which is the old file renamed."
(let ((umask (default-file-modes))
(dir (or (file-name-directory to-name)
default-directory)))
- ;; Can't delete or create files in a read-only directory.
- (unless (file-writable-p dir)
- (signal 'file-error (list "Directory is not writable" dir)))
(unwind-protect
(progn
;; Create temp files with strict access rights. It's easy to
@@ -3134,11 +3131,6 @@ BACKUPNAME is the backup file name, which is the old file renamed."
(set-default-file-modes ?\700)
(while (condition-case ()
(progn
- ;; If we allow for the possibility of something
- ;; creating the file between delete and copy
- ;; (below), we must also allow for the
- ;; possibility of something deleting it between
- ;; a file-exists-p check and a delete.
(condition-case nil
(delete-file to-name)
(file-error nil))
@@ -3147,8 +3139,6 @@ BACKUPNAME is the backup file name, which is the old file renamed."
(file-already-exists t))
;; The file was somehow created by someone else between
;; `delete-file' and `copy-file', so let's try again.
- ;; Does that every actually happen in practice?
- ;; This is a potential infloop, which seems bad...
;; rms says "I think there is also a possible race
;; condition for making backup files" (emacs-devel 20070821).
nil))