changeset 78646:f307172b344d

(backup-buffer-copy): Revert 2007-08-22 change.
author Glenn Morris <rgm@gnu.org>
date Fri, 24 Aug 2007 03:03:33 +0000
parents c2de812e1559
children fd75232a4a2c
files lisp/files.el
diffstat 1 files changed, 0 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Fri Aug 24 03:02:18 2007 +0000
+++ b/lisp/files.el	Fri Aug 24 03:03:33 2007 +0000
@@ -3123,9 +3123,6 @@
   (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 @@
 	  (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 @@
 		   (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))