fix bug introduced in c7dd72ab4b

This commit is contained in:
Robby Findler 2014-07-17 06:07:31 -05:00
parent 76aefcb508
commit 111d419631

View File

@ -1051,14 +1051,14 @@ profile todo:
[(and defs (send defs port-name-matches? file)) [(and defs (send defs port-name-matches? file))
(values defs void)] (values defs void)]
[(path? file) [(path? file)
(define file (define normalized-file
(with-handlers ((exn:fail? (λ (x) #f))) (with-handlers ((exn:fail? (λ (x) #f)))
(normal-case-path (normalize-path file)))) (normal-case-path (normalize-path file))))
(cond (cond
[(not file) (values #f void)] [(not normalized-file) (values #f void)]
[(send (group:get-the-frame-group) [(send (group:get-the-frame-group)
locate-file locate-file
file) normalized-file)
=> =>
(λ (frame) (λ (frame)
(cond (cond
@ -1072,15 +1072,15 @@ profile todo:
(if (with-handlers ((exn:fail? (λ (x) #f))) (if (with-handlers ((exn:fail? (λ (x) #f)))
(equal? (equal?
(normalize-path (normal-case-path (send defs get-filename))) (normalize-path (normal-case-path (send defs get-filename)))
file)) normalized-file))
(values defs void) (values defs void)
(loop (cdr tabs))))]))] (loop (cdr tabs))))]))]
[(is-a? frame frame:editor<%>) [(is-a? frame frame:editor<%>)
(values (send frame get-editor) void)] (values (send frame get-editor) void)]
[else (values #f void)]))] [else (values #f void)]))]
[(path? file) [(path? normalized-file)
(let ([text (new text:basic%)]) (let ([text (new text:basic%)])
(if (send text load-file file) (if (send text load-file normalized-file)
(values text (values text
(λ () (send text on-close))) (λ () (send text on-close)))
(values #f (λ () (void)))))] (values #f (λ () (void)))))]