From 740e5007bb8718da26b060a3bd2204917aec85a7 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 11 Nov 2012 09:21:35 -0700 Subject: [PATCH] racket/sandbox: fix module-path to path coercion for submod --- collects/racket/sandbox.rkt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/collects/racket/sandbox.rkt b/collects/racket/sandbox.rkt index 1a92699d6b..8acb49fc66 100644 --- a/collects/racket/sandbox.rkt +++ b/collects/racket/sandbox.rkt @@ -116,11 +116,14 @@ (define sep (bytes-ref (path->bytes (simplify-path "/")) 0)) ; '\' on windows (define (simplify-path* path) - (if (symbol? path) - #f - (simple-form-path (cond [(bytes? path) (bytes->path path)] - [(string? path) (string->path path)] - [else path])))) + (cond + [(symbol? path) #f] + [(and (pair? path) (eq? 'submod (car path))) + (simplify-path* (cadr path))] + [else + (simple-form-path (cond [(bytes? path) (bytes->path path)] + [(string? path) (string->path path)] + [else path]))])) ;; 'read-bytecode is special, it's higher than 'read, but not lower than ;; 'delete.