diff options
Diffstat (limited to 'lisp/diff-mode.el')
-rw-r--r-- | lisp/diff-mode.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index e0aee67a62b..7cd7375ab98 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -646,7 +646,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> |