diff options
Diffstat (limited to 'ide/minilib.ml')
-rw-r--r-- | ide/minilib.ml | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ide/minilib.ml b/ide/minilib.ml index 4896cbd4b..cec77f3b8 100644 --- a/ide/minilib.ml +++ b/ide/minilib.ml @@ -87,8 +87,18 @@ let xdg_config_dirs = List.map (fun dir -> Filename.concat dir "coq") (path_to_list (Sys.getenv "XDG_CONFIG_DIRS")) with Not_found -> "/etc/xdg/coq"::(match Coq_config.configdir with |None -> [] |Some d -> [d])) +let xdg_data_home = + try + Filename.concat (Sys.getenv "XDG_DATA_HOME") "coq" + with Not_found -> + Filename.concat home "/.local/share/coq" + +let xdg_data_dirs = + xdg_data_home :: (try + List.map (fun dir -> Filename.concat dir "coq") (path_to_list (Sys.getenv "XDG_DATA_DIRS")) + with Not_found -> + "/usr/local/share/coq"::"/usr/share/coq"::(match Coq_config.datadir with |None -> [] |Some d -> [d])) -let coqlib = ref "" let coqtop_path = ref "" (* On a Win32 application with no console, writing to stderr raise |