From 233993a3477f564d2b69e2270805dffa37d27784 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 23 Dec 1993 04:40:58 +0000 Subject: [PATCH] (dired-in-this-tree): Call expand-file-name. (dired-goto-file): Call expand-file-name. --- lisp/dired.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/dired.el b/lisp/dired.el index 44d0ec3747c..77235cb79c9 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1259,7 +1259,7 @@ Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on (defun dired-in-this-tree (file dir) ;;"Is FILE part of the directory tree starting at DIR?" (let (case-fold-search) - (string-match (concat "^" (regexp-quote dir)) file))) + (string-match (concat "^" (regexp-quote (expand-file-name dir))) file))) (defun dired-normalize-subdir (dir) ;; Prepend default-directory to DIR if relative path name. @@ -1400,7 +1400,7 @@ Returns the new value of the alist." (save-excursion ;; The hair here is to get the result of dired-goto-subdir ;; without really calling it if we don't have any subdirs. - (if (if (string= dir default-directory) + (if (if (string= dir (expand-file-name default-directory)) (goto-char (point-min)) (and (cdr dired-subdir-alist) (dired-goto-subdir dir))) -- 2.39.5