From 69941d4e195650bf59285b897c14d6287defea0f Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Wed, 20 May 2015 14:36:41 +0200 Subject: Continuing incomplete 4b5af0d6e9ec1 (on MacOS X, ensuring that files found in the file system have the expected lowercase/uppercase spelling) --- lib/system.ml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/system.ml') diff --git a/lib/system.ml b/lib/system.ml index 6364035e16..1a67120b60 100644 --- a/lib/system.ml +++ b/lib/system.ml @@ -53,12 +53,11 @@ let all_subdirs ~unix_path:root = if exists_dir root then traverse root []; List.rev !l -let file_really_exists f = +let file_exists_respecting_case f = if Coq_config.arch = "Darwin" then (* ensure that the file exists with expected case on the case-insensitive but case-preserving default MacOS file system *) let rec aux f = - Printf.eprintf ".%!"; let bf = Filename.basename f in let df = Filename.dirname f in String.equal df "." || String.equal df "/" || @@ -90,7 +89,7 @@ let where_in_path ?(warn=true) path filename = in check_and_warn (search path (fun lpe -> let f = Filename.concat lpe filename in - if Sys.file_exists f then [lpe,f] else [])) + if file_exists_respecting_case f then [lpe,f] else [])) let where_in_path_rex path rex = search path (fun lpe -> @@ -106,7 +105,7 @@ let where_in_path_rex path rex = let find_file_in_path ?(warn=true) paths filename = if not (Filename.is_implicit filename) then - if Sys.file_exists filename then + if file_exists_respecting_case filename then let root = Filename.dirname filename in root, filename else -- cgit v1.2.3