diff options
author | Glenn Morris <rgm@gnu.org> | 2007-08-27 07:11:57 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2007-08-27 07:11:57 +0000 |
commit | f9274544eb1d197970535bfc5a8f27a23fca9345 (patch) | |
tree | 57204a8b48b25e5ac4435cdfb236e80a2bb2c0cf /lisp/diff-mode.el | |
parent | c62a495a84df7fc23d7302657605a73eecc7f5e1 (diff) | |
download | emacs-f9274544eb1d197970535bfc5a8f27a23fca9345.tar.gz |
(diff-find-file-name): Only accept regular files, to rule out
/dev/null, directories, etc.
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r-- | lisp/diff-mode.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index be4c7e7b905..68f7995a494 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -682,7 +682,9 @@ PREFIX is only used internally: don't use it." ((or (null files) (setq file (do* ((files files (cdr files)) (file (car files) (car files))) - ((or (null file) (file-exists-p file)) + ;; Use file-regular-p to avoid + ;; /dev/null, directories, etc. + ((or (null file) (file-regular-p file)) file)))) file)) ;; <foo>.rej patches implicitly apply to <foo> |