emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/files.el,v [EMACS_22_BASE]


From: Martin Rudalics
Subject: [Emacs-diffs] Changes to emacs/lisp/files.el,v [EMACS_22_BASE]
Date: Thu, 30 Aug 2007 08:15:39 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     Martin Rudalics <m061211>       07/08/30 08:15:38

Index: files.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.896.2.19
retrieving revision 1.896.2.20
diff -u -b -r1.896.2.19 -r1.896.2.20
--- files.el    24 Aug 2007 07:11:54 -0000      1.896.2.19
+++ files.el    30 Aug 2007 08:15:37 -0000      1.896.2.20
@@ -3127,9 +3127,13 @@
          ;; loosen them later, whereas it's impossible to close the
          ;; time-window of loose permissions otherwise.
          (set-default-file-modes ?\700)
-         (while (condition-case ()
+         (when (condition-case nil
+                   ;; Try to overwrite old backup first.
+                   (copy-file from-name to-name t t)
+                 (error t))
+           (while (condition-case nil
                     (progn
-                      (and (file-exists-p to-name)
+                        (when (file-exists-p to-name)
                            (delete-file to-name))
                       (copy-file from-name to-name nil t)
                       nil)
@@ -3138,7 +3142,7 @@
            ;; `delete-file' and `copy-file', so let's try again.
            ;; rms says "I think there is also a possible race
            ;; condition for making backup files" (emacs-devel 20070821).
-           nil))
+             nil)))
       ;; Reset the umask.
       (set-default-file-modes umask)))
   (and modes




reply via email to

[Prev in Thread] Current Thread [Next in Thread]