aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMaxime Dénès2017-09-27 00:38:25 +0200
committerMaxime Dénès2017-09-27 00:49:51 +0200
commit77d95ecd65a6bbebfcd89193fb3e2c43ebc6469a (patch)
tree8424d2ec39f0ac2e1fa598f0d2208954389eed61 /lib
parentb9740771e8113cb9e607793887be7a12587d0326 (diff)
Avoid looping when searching for CoqProject.
This could happen with paths on Windows, or even relative paths on all OSs. Fixes #5730: CoqIDE becomes unresponsive on file open.
Diffstat (limited to 'lib')
-rw-r--r--lib/coqProject_file.ml42
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/coqProject_file.ml4 b/lib/coqProject_file.ml4
index 13de731f54..970666638c 100644
--- a/lib/coqProject_file.ml4
+++ b/lib/coqProject_file.ml4
@@ -206,7 +206,7 @@ let rec find_project_file ~from ~projfile_name =
if Sys.file_exists fname then Some fname
else
let newdir = Filename.dirname from in
- if newdir = "" || newdir = "/" then None
+ if newdir = from then None
else find_project_file ~from:newdir ~projfile_name
;;