Use Sys.{win32,cygwin} rather than Sys.os_type
The former functions are optimized away while the latter isn't. Signed-off-by: Jeremie Dimino <jdimino@janestreet.com>
This commit is contained in:
parent
547998d6c6
commit
d2b66279f6
|
@ -1,7 +1,8 @@
|
||||||
let is_dir_sep =
|
let is_dir_sep =
|
||||||
match Sys.os_type with
|
if Sys.win32 || Sys.cygwin then
|
||||||
| "Win32" | "Cygwin" -> fun c -> c = '/' || c = '\\' || c = ':'
|
fun c -> c = '/' || c = '\\' || c = ':'
|
||||||
| _ -> fun c -> c = '/'
|
else
|
||||||
|
fun c -> c = '/'
|
||||||
|
|
||||||
let explode_path =
|
let explode_path =
|
||||||
let rec start acc path i =
|
let rec start acc path i =
|
||||||
|
|
Loading…
Reference in New Issue