Commit 3f7d6528 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

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

parent 8dc87047
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment