diff options
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/files.el | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 00ca21c903..d1ec662bac 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-05-20 Nix <[email protected]> + + * files.el (basic-save-buffer-2): + Fix handling of break-hardlink-on-save with non-existent files. + 2011-05-19 Deniz Dogan <[email protected]> * net/rcirc.el (rcirc-mode): Initialize rcirc-urls to nil. diff --git a/lisp/files.el b/lisp/files.el index 336a0a436f..200b9b1d30 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 |