From: Glenn Morris Date: Mon, 27 Aug 2007 07:11:57 +0000 (+0000) Subject: (diff-find-file-name): Only accept regular files, to rule out X-Git-Tag: emacs-pretest-23.0.90~11263 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f9274544eb1d197970535bfc5a8f27a23fca9345;p=emacs.git (diff-find-file-name): Only accept regular files, to rule out /dev/null, directories, etc. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b40e8daab9f..a977ef4e970 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2007-08-27 Glenn Morris + * 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. 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)) ;; .rej patches implicitly apply to