···33let dotdot = ".."
34let dotdot_sub = String.sub dotdot
3536-let validate_and_collapse_seps p = try
37 (* collapse non-initial sequences of [dir_sep] to a single one and checks
38 no null byte *)
39 let max_idx = String.length p - 1 in
···60 if max_idx > 0 then (if p.[0] = dir_sep_char then 1 else 0) else 0
61 in
62 try_no_alloc false start
63-with Exit -> None
6465let is_unc_path_windows p = String.is_prefix "\\\\" p
66
···33let dotdot = ".."
34let dotdot_sub = String.sub dotdot
3536+let validate_and_collapse_seps p =
37 (* collapse non-initial sequences of [dir_sep] to a single one and checks
38 no null byte *)
39 let max_idx = String.length p - 1 in
···60 if max_idx > 0 then (if p.[0] = dir_sep_char then 1 else 0) else 0
61 in
62 try_no_alloc false start
06364let is_unc_path_windows p = String.is_prefix "\\\\" p
65