]> git.eshelyaron.com Git - emacs.git/commitdiff
(dired-in-this-tree): Call expand-file-name.
authorRichard M. Stallman <rms@gnu.org>
Thu, 23 Dec 1993 04:40:58 +0000 (04:40 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 23 Dec 1993 04:40:58 +0000 (04:40 +0000)
(dired-goto-file): Call expand-file-name.

lisp/dired.el

index 44d0ec3747c705ee24ac0ae3748c3309ac751f09..77235cb79c9759959b2655c6a8402cd4e5b74b65 100644 (file)
@@ -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)))