diff --git a/collects/setup/dirs.ss b/collects/setup/dirs.ss index 3b8f12c92f..f6590e0e6a 100644 --- a/collects/setup/dirs.ss +++ b/collects/setup/dirs.ss @@ -10,8 +10,10 @@ ;; best to do some minor normalization. This is similar to what ;; "main-collects.ss" does. Again, this makes mzscheme expand paths ;; that begin with `~'. + ;; Note: (expand-path (simplify-path P #f)) is bogus, if P is + ;; "./~foo" or "~foo/.." (define (system-path* what) - (expand-path (simplify-path (find-system-path what) #f))) + (simplify-path (expand-path (find-system-path what) #f))) ;; ---------------------------------------- ;; "collects" diff --git a/collects/setup/main-collects.ss b/collects/setup/main-collects.ss index 91dfa626c3..b4323c492b 100644 --- a/collects/setup/main-collects.ss +++ b/collects/setup/main-collects.ss @@ -23,8 +23,10 @@ ;; fine: getting rid of `.' and `..' (simplify-path) and collapsing ;; `//' to `/' (expand-path). Using `expand-path' also expands `~' ;; and `~user', but this should not be a problem in practice. + ;; Note: (expand-path (simplify-path P)) is bogus, if P is "./~foo" + ;; or "~foo/.." (define (simplify-bytes-path bytes) - (path->bytes (expand-path (simplify-path (bytes->path bytes))))) + (path->bytes (simplify-path (expand-path (bytes->path bytes))))) ;; on Windows, turn backslashes to forward slashes (define simplify-path* (if (eq? 'windows (system-type))