mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-29 07:58:28 +00:00
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".
This commit is contained in:
parent
6d020ecd89
commit
adc7d9e89c
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user