From f9274544eb1d197970535bfc5a8f27a23fca9345 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 27 Aug 2007 07:11:57 +0000 Subject: [PATCH] (diff-find-file-name): Only accept regular files, to rule out /dev/null, directories, etc. --- lisp/ChangeLog | 3 +++ lisp/diff-mode.el | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) 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 -- 2.39.2