]> git.eshelyaron.com Git - emacs.git/commitdiff
Small break-hardlink-on-save fix.
authorNix <nix@esperi.org.uk>
Fri, 20 May 2011 00:51:46 +0000 (17:51 -0700)
committerGlenn Morris <rgm@gnu.org>
Fri, 20 May 2011 00:51:46 +0000 (17:51 -0700)
* files.el (basic-save-buffer-2):
Fix handling of break-hardlink-on-save with non-existent files.

lisp/ChangeLog
lisp/files.el

index 00ca21c903b5ec539fd3307434b4549523d4c5b2..d1ec662bac89a9ce0d025793c945a46dc249ea17 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-20  Nix  <nix@esperi.org.uk>
+
+       * files.el (basic-save-buffer-2):
+       Fix handling of break-hardlink-on-save with non-existent files.
+
 2011-05-19  Deniz Dogan  <deniz@dogan.se>
 
        * net/rcirc.el (rcirc-mode): Initialize rcirc-urls to nil.
index 336a0a436f9e72c12db615391723e232c949ebd4..200b9b1d3032a129076065d6d833147188d24ef7 100644 (file)
@@ -4517,6 +4517,7 @@ Before and after saving the buffer, this function runs
            (dir-writable (file-writable-p dir)))
       (if (or (and file-precious-flag dir-writable)
               (and break-hardlink-on-save
+                   (file-exists-p buffer-file-name)
                    (> (file-nlinks buffer-file-name) 1)
                    (or dir-writable
                        (error (concat (format