aboutsummaryrefslogtreecommitdiffhomepage
path: root/ide/minilib.ml
diff options
context:
space:
mode:
Diffstat (limited to 'ide/minilib.ml')
-rw-r--r--ide/minilib.ml8
1 files changed, 7 insertions, 1 deletions
diff --git a/ide/minilib.ml b/ide/minilib.ml
index 9833fbd6b..f072ff9fa 100644
--- a/ide/minilib.ml
+++ b/ide/minilib.ml
@@ -58,7 +58,13 @@ let list_filter_i p =
let subst_command_placeholder s t =
Str.global_replace (Str.regexp_string "%s") s t
-let home = try Sys.getenv "HOME" with Not_found -> "."
+(* On win32, the home directory is probably not in $HOME, but in
+ some other environment variable *)
+
+let home =
+ try Sys.getenv "HOME" with Not_found ->
+ try (Sys.getenv "HOMEDRIVE")^(Sys.getenv "HOMEPATH") with Not_found ->
+ try Sys.getenv "USERPROFILE" with Not_found -> "."
let coqlib = ref ""
let coqtop_path = ref ""