summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2002-08-06 03:03:09 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2002-08-06 03:03:09 +0000
commitc77e38607acf67a66a7bcd4b5b774c8f1c211e79 (patch)
tree1730312206efcc94401bdfd99129881fa4aa2307
parentbae927f1f95d0beb55dfc544819749f2b51ce278 (diff)
win32 path
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5081 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--otherlibs/labltk/browser/shell.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/otherlibs/labltk/browser/shell.ml b/otherlibs/labltk/browser/shell.ml
index 13be2c3f9..18e1f3494 100644
--- a/otherlibs/labltk/browser/shell.ml
+++ b/otherlibs/labltk/browser/shell.ml
@@ -260,6 +260,9 @@ let program_not_found prog =
Jg_message.info ~title:"Error"
("Program \"" ^ prog ^ "\"\nwas not found in path")
+let protect_arg s =
+ if String.contains s ' ' then "\"" ^ s ^ "\"" else s
+
let f ~prog ~title =
let progargs =
List.filter ~f:((<>) "") (Str.split ~!" " prog) in
@@ -294,6 +297,8 @@ let f ~prog ~title =
end in
let load_path =
List2.flat_map !Config.load_path ~f:(fun dir -> ["-I"; dir]) in
+ let load_path =
+ if is_win32 then List.map ~f:protect_arg load_path else load_path in
let labels = if !Clflags.classic then ["-nolabels"] else [] in
let rectypes = if !Clflags.recursive_types then ["-rectypes"] else [] in
let warnings =