diff --git a/racket/src/io/path/api.rkt b/racket/src/io/path/api.rkt index 61fe9f17b7..f10f309c5c 100644 --- a/racket/src/io/path/api.rkt +++ b/racket/src/io/path/api.rkt @@ -44,13 +44,17 @@ path])) (define/who current-directory - (chaperone-procedure raw:current-directory (make-guard-paths who))) + (let ([guard (make-guard-paths who)]) + (make-derived-parameter raw:current-directory guard guard))) (define/who current-directory-for-path->complete-path - (chaperone-procedure raw:current-directory (make-guard-paths 'path->complete-path))) + (let ([guard (make-guard-paths 'path->complete-path)]) + (make-derived-parameter raw:current-directory guard guard))) (define/who current-directory-for-user - (chaperone-procedure raw:current-directory-for-user (make-guard-paths who))) + (let ([guard (make-guard-paths who)]) + (make-derived-parameter raw:current-directory-for-user guard guard))) (define/who current-load-relative-directory - (chaperone-procedure raw:current-load-relative-directory (make-guard-paths who))) + (let ([guard (make-guard-paths who)]) + (make-derived-parameter raw:current-load-relative-directory guard guard)))