changeset 82910:292ec9e3a20c

(diff-find-file-name): Only accept regular files, to rule out /dev/null, directories, etc.
author Glenn Morris <rgm@gnu.org>
date Mon, 27 Aug 2007 07:11:32 +0000
parents 01df6fb7c1e7
children 369fb8b238dd
files lisp/diff-mode.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/diff-mode.el	Mon Aug 27 07:04:45 2007 +0000
+++ b/lisp/diff-mode.el	Mon Aug 27 07:11:32 2007 +0000
@@ -682,7 +682,9 @@
 	   ((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>