summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/files.el1
2 files changed, 6 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 00ca21c903b..d1ec662bac8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/files.el b/lisp/files.el
index 336a0a436f9..200b9b1d303 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -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