io: repairs for Windows environment variables
This commit is contained in:
parent
23648ba165
commit
29a80fd7e5
|
@ -120,6 +120,6 @@
|
||||||
(define ht (environment-variables-ht e))
|
(define ht (environment-variables-ht e))
|
||||||
(cond
|
(cond
|
||||||
[(not ht)
|
[(not ht)
|
||||||
(environment-variables-names (environment-variables-copy e))]
|
(map normalize-key (environment-variables-names (environment-variables-copy e)))]
|
||||||
[else
|
[else
|
||||||
(hash-keys ht)]))
|
(hash-keys ht)]))
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require "../common/bytes-no-nuls.rkt"
|
(require "../common/bytes-no-nuls.rkt"
|
||||||
|
"../locale/string.rkt"
|
||||||
"../host/rktio.rkt")
|
"../host/rktio.rkt")
|
||||||
|
|
||||||
(provide bytes-no-nuls?
|
(provide bytes-no-nuls?
|
||||||
|
@ -12,5 +13,6 @@
|
||||||
|
|
||||||
(define (normalize-key k)
|
(define (normalize-key k)
|
||||||
(if (rktio_are_envvar_names_case_insensitive rktio)
|
(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))
|
k))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user