From 3266bca7ceffd3c7f51913ceba1f1c8d675f9d49 Mon Sep 17 00:00:00 2001 From: herbelin Date: Wed, 24 Jan 2001 22:38:13 +0000 Subject: 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 --- lib/system.ml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'lib/system.ml') 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 -- cgit v1.2.3