1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-03 11:33:37 +00:00

(file-relative-name): Fix last change.

This commit is contained in:
Stefan Monnier 2004-03-26 16:21:03 +00:00
parent 8dc87047d1
commit 3f7d6528a2

View File

@ -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