diff --git a/collects/syntax/modresolve.rkt b/collects/syntax/modresolve.rkt index 3faaa9c638..ad80cf8918 100644 --- a/collects/syntax/modresolve.rkt +++ b/collects/syntax/modresolve.rkt @@ -42,7 +42,7 @@ [(and (or (not (pair? s)) (not (list? s))) (not (path? s))) #f] [(or (path? s) (eq? (car s) 'file)) - (let ([p (if (path? s) s (cadr s))]) + (let ([p (if (path? s) s (expand-user-path (cadr s)))]) (path-ss->rkt (path->complete-path p (let ([d (get-dir)]) diff --git a/collects/tests/racket/moddep.rktl b/collects/tests/racket/moddep.rktl index b6cfcf267f..2ebc116810 100644 --- a/collects/tests/racket/moddep.rktl +++ b/collects/tests/racket/moddep.rktl @@ -63,6 +63,8 @@ (err/rt-test (resolve-module-path-index "apple.ss" #f)) (err/rt-test (resolve-module-path-index (module-path-index-join #f #f) #f) exn:fail?) +(test (expand-user-path "~/x.rkt") resolve-module-path '(file "~/x.rkt") #f) + ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; collapse-module-path[-index]