io: another repair to Windows path parsing

This commit is contained in:
Matthew Flatt 2018-03-23 21:46:12 -06:00
parent 2754f22844
commit 7fd6e07ad7
2 changed files with 2 additions and 1 deletions

View File

@ -736,6 +736,7 @@
(test (list (string->path "../aux/") (string->path "z")) get-base (coerce "../aux/z"))
(test (list (string->path "../aux.m/") (string->path "z")) get-base (coerce "../aux.m/z"))
(test (list (string->path "../") (string->path "\\\\?\\REL\\\\aux.m")) get-base (coerce "../aux.m/"))
(test (list (string->path "../") (string->path "auxy.m")) get-base (coerce "../auxy.m/"))
(test (list (string->path "c:/") (string->path "\\\\?\\REL\\\\aux.m")) get-base (coerce "c:/aux.m/"))
(test (list (string->path "c:/") (string->path "\\\\?\\REL\\\\aux.m.p")) get-base (coerce "c:/aux.m.p/"))
(test (list (string->path "c:/") (string->path "\\\\?\\REL\\\\aux:m")) get-base (coerce "c:/aux:m/"))

View File

@ -56,7 +56,7 @@
(or (= len fn-len)
(eqv? (bytes-ref bstr fn-len) (char->integer #\.))
(eqv? (bytes-ref bstr fn-len) (char->integer #\:))
(for/and ([b (in-bytes bstr len)])
(for/and ([b (in-bytes bstr fn-len)])
(or (eqv? b (char->integer #\space))
(eqv? b (char->integer #\.)))))))]))