]> git.eshelyaron.com Git - emacs.git/commitdiff
(diff-find-file-name): Only accept regular files, to rule out
authorGlenn Morris <rgm@gnu.org>
Mon, 27 Aug 2007 07:11:57 +0000 (07:11 +0000)
committerGlenn Morris <rgm@gnu.org>
Mon, 27 Aug 2007 07:11:57 +0000 (07:11 +0000)
/dev/null, directories, etc.

lisp/ChangeLog
lisp/diff-mode.el

index b40e8daab9f90807f0b6882432ec641be076519a..a977ef4e9703f279b0ca351f617ea4804cc854eb 100644 (file)
@@ -1,5 +1,8 @@
 2007-08-27  Glenn Morris  <rgm@gnu.org>
 
+       * diff-mode.el (diff-find-file-name): Only accept regular files,
+       to rule out /dev/null, directories, etc.
+
        * vc-svn.el (vc-svn-diff): If the repository version of all the
        files is the same as the specified OLDVERS, do a local diff.
 
index be4c7e7b905ff8ceb5fcaaba415fc8afff0b4acf..68f7995a494469cdc8e5be4f274473e458cbd593 100644 (file)
@@ -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>