changeset 78676:b2023ab19990

(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:10:50 +0000
parents 836ecea97157
children fbc5eac783af
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:10:06 2007 +0000
+++ b/lisp/diff-mode.el	Mon Aug 27 07:10:50 2007 +0000
@@ -646,7 +646,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>