diff options
author | Kaushal Modi <kaushal.modi@gmail.com> | 2017-04-05 17:16:33 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2017-04-07 18:29:28 -0400 |
commit | 75824977851f27146638672bba4d3789f2a32612 (patch) | |
tree | 47175fec5badfd681d65e4cdf29709e1aacd22b3 /lisp/vc/ediff-diff.el | |
parent | 9e27e0d1a6c90d0d29e41884155245b6c3378b0a (diff) | |
download | emacs-75824977851f27146638672bba4d3789f2a32612.tar.gz emacs-75824977851f27146638672bba4d3789f2a32612.tar.bz2 emacs-75824977851f27146638672bba4d3789f2a32612.zip |
Check that file argument is a string
* lisp/vc/ediff-diff.el (ediff-exec-process): Check that the argument
passed to `file-local-copy' is a string (Bug#26378). Also fix
the existing comment for this function, and convert it to its
doc-string.
Diffstat (limited to 'lisp/vc/ediff-diff.el')
-rw-r--r-- | lisp/vc/ediff-diff.el | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el index cfa08ef3604..ded82c41c9b 100644 --- a/lisp/vc/ediff-diff.el +++ b/lisp/vc/ediff-diff.el @@ -1134,12 +1134,20 @@ delimiter regions")) )) -;; Execute PROGRAM asynchronously, unless OS/2, Windows-*, or DOS, or unless -;; SYNCH is non-nil. BUFFER must be a buffer object, and must be alive. The -;; OPTIONS arg is a list of options to pass to PROGRAM. It may be a blank -;; string. All elements in FILES must be strings. We also delete nil from -;; args. (defun ediff-exec-process (program buffer synch options &rest files) + "Execute the diff PROGRAM. + +The PROGRAM output is sent to BUFFER, which must be a live buffer +object. + +The PROGRAM is executed asynchronously unless `system-type' is +`windows-nt' or `ms-dos', or SYNCH is non-nil. + +OPTIONS is a string of space-separated options to pass to PROGRAM. It +may be a blank string. + +FILES is a list of filenames to pass to PROGRAM; nil and \"\" elements +are ignored." (let ((data (match-data)) ;; If this is a buffer job, we are diffing temporary files ;; produced by Emacs with ediff-coding-system-for-write, so @@ -1151,8 +1159,9 @@ delimiter regions")) args) (setq args (append (split-string options) (mapcar (lambda (file) - (file-name-unquote - (or (file-local-copy file) file))) + (when (stringp file) + (file-name-unquote + (or (file-local-copy file) file)))) files))) (setq args (delete "" (delq nil args))) ; delete nil and "" from arguments ;; the --binary option, if present, should be used only for buffer jobs |