aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/system.ml14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/system.ml b/lib/system.ml
index bc55c461b7..b743df478e 100644
--- a/lib/system.ml
+++ b/lib/system.ml
@@ -29,11 +29,15 @@ let all_subdirs root alias =
let f = readdir dirh in
if f <> "." && f <> ".." && (not Coq_config.local or (f <> "CVS")) then
let file = Filename.concat dir f in
- if (stat file).st_kind = S_DIR then begin
- let newrel = rel@[f] in
- add file newrel;
- traverse file newrel
- end
+ try
+ if (stat file).st_kind = S_DIR then begin
+ let newrel = rel@[f] in
+ add file newrel;
+ traverse file newrel
+ end
+ with Unix_error (e,s1,s2) ->
+ Printf.printf "Error while scanning load path:\n %s: %s\n"
+ s2 (error_message e)
done
with End_of_file ->
closedir dirh