io: repairs for Windows environment variables

This commit is contained in:
Matthew Flatt 2018-10-26 14:19:54 -06:00
parent 23648ba165
commit 29a80fd7e5
2 changed files with 4 additions and 2 deletions

View File

@ -120,6 +120,6 @@
(define ht (environment-variables-ht e))
(cond
[(not ht)
(environment-variables-names (environment-variables-copy e))]
(map normalize-key (environment-variables-names (environment-variables-copy e)))]
[else
(hash-keys ht)]))

View File

@ -1,5 +1,6 @@
#lang racket/base
(require "../common/bytes-no-nuls.rkt"
"../locale/string.rkt"
"../host/rktio.rkt")
(provide bytes-no-nuls?
@ -12,5 +13,6 @@
(define (normalize-key k)
(if (rktio_are_envvar_names_case_insensitive rktio)
(string->immutable-string (string-foldcase k))
(bytes->immutable-bytes
(string->bytes/locale (string-foldcase (bytes->string/locale k))))
k))