From: Nix Date: Fri, 20 May 2011 00:51:46 +0000 (-0700) Subject: Small break-hardlink-on-save fix. X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~237^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=35fd0881e61b873ae8c7e4dd9b723d5dd2b578c9;p=emacs.git Small break-hardlink-on-save fix. * files.el (basic-save-buffer-2): Fix handling of break-hardlink-on-save with non-existent files. --- 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 + + * files.el (basic-save-buffer-2): + Fix handling of break-hardlink-on-save with non-existent files. + 2011-05-19 Deniz Dogan * 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