|
@@ -3511,19 +3511,25 @@ let type_module ctx mpath file ?(is_extern=false) tdecls p =
|
|
|
|
|
|
let resolve_module_file com m remap p =
|
|
let resolve_module_file com m remap p =
|
|
let forbid = ref false in
|
|
let forbid = ref false in
|
|
- let file = (match m with
|
|
|
|
|
|
+ let compose_path no_rename =
|
|
|
|
+ (match m with
|
|
| [] , name -> name
|
|
| [] , name -> name
|
|
| x :: l , name ->
|
|
| x :: l , name ->
|
|
let x = (try
|
|
let x = (try
|
|
match PMap.find x com.package_rules with
|
|
match PMap.find x com.package_rules with
|
|
| Forbidden -> forbid := true; x
|
|
| Forbidden -> forbid := true; x
|
|
- | Directory d -> d
|
|
|
|
|
|
+ | Directory d -> if no_rename then x else d
|
|
| Remap d -> remap := d :: l; d
|
|
| Remap d -> remap := d :: l; d
|
|
with Not_found -> x
|
|
with Not_found -> x
|
|
) in
|
|
) in
|
|
String.concat "/" (x :: l) ^ "/" ^ name
|
|
String.concat "/" (x :: l) ^ "/" ^ name
|
|
- ) ^ ".hx" in
|
|
|
|
- let file = Common.find_file com file in
|
|
|
|
|
|
+ ) ^ ".hx"
|
|
|
|
+ in
|
|
|
|
+ let file = try
|
|
|
|
+ Common.find_file com (compose_path false)
|
|
|
|
+ with Not_found ->
|
|
|
|
+ Common.find_file com (compose_path true)
|
|
|
|
+ in
|
|
let file = (match String.lowercase (snd m) with
|
|
let file = (match String.lowercase (snd m) with
|
|
| "con" | "aux" | "prn" | "nul" | "com1" | "com2" | "com3" | "lpt1" | "lpt2" | "lpt3" when Sys.os_type = "Win32" ->
|
|
| "con" | "aux" | "prn" | "nul" | "com1" | "com2" | "com3" | "lpt1" | "lpt2" | "lpt3" when Sys.os_type = "Win32" ->
|
|
(* these names are reserved by the OS - old DOS legacy, such files cannot be easily created but are reported as visible *)
|
|
(* these names are reserved by the OS - old DOS legacy, such files cannot be easily created but are reported as visible *)
|