From: Stefan Monnier Date: Fri, 26 Mar 2004 16:21:03 +0000 (+0000) Subject: (file-relative-name): Fix last change. X-Git-Tag: ttn-vms-21-2-B4~7075 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3f7d6528a299fca03b023cc140b809ac0250999c;p=emacs.git (file-relative-name): Fix last change. --- diff --git a/lisp/files.el b/lisp/files.el index a36006f2320..eb6d1635fc9 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2940,7 +2940,7 @@ on a DOS/Windows machine, it returns FILENAME on expanded form." directory nil nil case-fold-search)) ;; We matched within FILENAME's directory part. ;; Add the rest of FILENAME onto ANCESTOR. - (let ((rest (substring filename (match-end 0)))) + (let ((rest (substring filename (length directory)))) (if (and (equal ancestor ".") (not (equal rest ""))) ;; But don't bother with ANCESTOR if it would give us `./'. rest