summaryrefslogtreecommitdiff
path: root/ocamlbuild/shell.ml
diff options
context:
space:
mode:
Diffstat (limited to 'ocamlbuild/shell.ml')
-rw-r--r--ocamlbuild/shell.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/ocamlbuild/shell.ml b/ocamlbuild/shell.ml
index c76d154583..3fbeb81aa7 100644
--- a/ocamlbuild/shell.ml
+++ b/ocamlbuild/shell.ml
@@ -23,7 +23,12 @@ let is_simple_filename s =
| _ -> false in
loop 0
let quote_filename_if_needed s =
- if is_simple_filename s then s else Filename.quote s
+ if is_simple_filename s then s
+ (* We should probably be using [Filename.unix_quote] except that function
+ * isn't exported. Users on Windows will have to live with not being able to
+ * install OCaml into c:\o'caml. Too bad. *)
+ else if Sys.os_type = "Win32" then Printf.sprintf "'%s'" s
+ else Filename.quote s
let chdir dir =
reset_filesys_cache ();
Sys.chdir dir