summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorNix <nix@esperi.org.uk>2011-05-19 17:51:46 -0700
committerGlenn Morris <rgm@gnu.org>2011-05-19 17:51:46 -0700
commit35fd0881e61b873ae8c7e4dd9b723d5dd2b578c9 (patch)
treea0c3308989a84176bdd113c6a5557dc49060708e /lisp/files.el
parent4d4b75e88896b3bbcc12b4ec8eb61c2830390227 (diff)
downloademacs-35fd0881e61b873ae8c7e4dd9b723d5dd2b578c9.tar.gz
Small break-hardlink-on-save fix.
* files.el (basic-save-buffer-2): Fix handling of break-hardlink-on-save with non-existent files.
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el1
1 files changed, 1 insertions, 0 deletions
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