diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2015-11-26 14:24:54 +0100 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2015-11-26 14:24:54 +0100 |
commit | 36c6e9508a42d00686e90441999481354152aaa3 (patch) | |
tree | 882909be1c393764f13923e059448f3808fa0966 /lib/envars.ml | |
parent | b58e8aa6525d45473f88fbea71bab88a2b46c825 (diff) | |
parent | b1a5fe3686ecd5b03e5c7c2efd95716a8e5270ea (diff) |
Merge branch 'v8.5'
Diffstat (limited to 'lib/envars.ml')
-rw-r--r-- | lib/envars.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/envars.ml b/lib/envars.ml index bafe2401b..512114d5d 100644 --- a/lib/envars.ml +++ b/lib/envars.ml @@ -39,6 +39,8 @@ let path_to_list p = let user_path () = path_to_list (Sys.getenv "PATH") (* may raise Not_found *) +(* Finding a name in path using the equality provided by the file system *) +(* whether it is case-sensitive or case-insensitive *) let rec which l f = match l with | [] -> @@ -99,7 +101,8 @@ let _ = (** [check_file_else ~dir ~file oth] checks if [file] exists in the installation directory [dir] given relatively to [coqroot]. If this Coq is only locally built, then [file] must be in [coqroot]. - If the check fails, then [oth ()] is evaluated. *) + If the check fails, then [oth ()] is evaluated. + Using file system equality seems well enough for this heuristic *) let check_file_else ~dir ~file oth = let path = if Coq_config.local then coqroot else coqroot / dir in if Sys.file_exists (path / file) then path else oth () |