emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master adc7d9e: Don't pass raw directory name to 'error'


From: Paul Eggert
Subject: [Emacs-diffs] master adc7d9e: Don't pass raw directory name to 'error'
Date: Thu, 04 Jun 2015 00:19:23 +0000

branch: master
commit adc7d9e89c8fc3bda483b2b543d7774e8fde1bac
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Don't pass raw directory name to 'error'
    
    * lisp/files.el (basic-save-buffer-2): Avoid format error if
    a directory name contains a string like "%s".
---
 lisp/files.el |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/files.el b/lisp/files.el
index 6939f2b..26f9f70 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4844,9 +4844,9 @@ Before and after saving the buffer, this function runs
                    (file-exists-p buffer-file-name)
                    (> (file-nlinks buffer-file-name) 1)
                    (or dir-writable
-                       (error (concat (format
-                                       "Directory %s write-protected; " dir)
-                                      "cannot break hardlink when saving")))))
+                       (error (concat "Directory %s write-protected; "
+                                      "cannot break hardlink when saving")
+                              dir))))
          ;; Write temp name, then rename it.
          ;; This requires write access to the containing dir,
          ;; which is why we don't try it if we don't have that access.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]