@@ -562,6 +562,14 @@ let get_full_path f = try Extc.get_full_path f with _ -> f
let unique_full_path = if Sys.os_type = "Win32" || Sys.os_type = "Cygwin" then (fun f -> String.lowercase (get_full_path f)) else get_full_path
+let normalize_path p =
+ let l = String.length p in
+ if l = 0 then
+ "./"
+ else match p.[l-1] with
+ | '\\' | '/' -> p
+ | _ -> p ^ "/"
+
(* ------------------------- TIMERS ----------------------------- *)
type timer_infos = {
@@ -2348,7 +2348,7 @@ let macro_lib =
match v with
| VString cp ->
let com = ccom() in
- com.class_path <- cp :: com.class_path;
+ com.class_path <- (Common.normalize_path cp) :: com.class_path;
VNull
| _ ->
error()
@@ -49,14 +49,6 @@ let global_cache = ref None
let executable_path() =
Extc.executable_path()
-let normalize_path p =
- let l = String.length p in
- if l = 0 then
- "./"
- else match p.[l-1] with
- | '\\' | '/' -> p
- | _ -> p ^ "/"
-
let format msg p =
if p = Ast.null_pos then
msg