aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherbelin2001-01-24 22:38:13 +0000
committerherbelin2001-01-24 22:38:13 +0000
commit3266bca7ceffd3c7f51913ceba1f1c8d675f9d49 (patch)
treecb05efe241c36b7edb4e5dc565456d1f518d86a1
parent172462d401768059e9b16a0d266da19d9a89ccc1 (diff)
Protection contre l'échec de Unix.stat
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1274 85f007b7-540e-0410-9357-904b9bb8a0f7
-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