summaryrefslogtreecommitdiff
path: root/lisp/diff-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r--lisp/diff-mode.el4
1 files changed, 3 insertions, 1 deletions
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))
;; <foo>.rej patches implicitly apply to <foo>