From: Ferruccio Guidi Date: Sun, 23 Sep 2007 19:57:56 +0000 (+0000) Subject: we chmod the created directories to override the umask settings X-Git-Tag: make_still_working~5997 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=95c552c01db5a8822a4ea14a59f4ca5ce21b7c84;p=helm.git we chmod the created directories to override the umask settings --- diff --git a/helm/software/components/extlib/hExtlib.ml b/helm/software/components/extlib/hExtlib.ml index bf3bb2574..9e2277b43 100644 --- a/helm/software/components/extlib/hExtlib.ml +++ b/helm/software/components/extlib/hExtlib.ml @@ -236,6 +236,9 @@ let is_executable fname = (stat.Unix.st_perm land 0o001 > 0) with Unix.Unix_error _ -> false +let chmod mode filename = + Unix.chmod filename mode + let mkdir path = let components = split ~sep:'/' path in let rec aux where = function @@ -244,21 +247,18 @@ let mkdir path = let path = if where = "" then piece else where ^ "/" ^ piece in (try - Unix.mkdir path 0o775 + Unix.mkdir path 0o755; chmod 0o2775 path with | Unix.Unix_error (Unix.EEXIST,_,_) -> () | Unix.Unix_error (e,_,_) -> raise (Failure - ("Unix.mkdir " ^ path ^ " 0o775 :" ^ (Unix.error_message e)))); + ("Unix.mkdir " ^ path ^ " 0o2775 :" ^ (Unix.error_message e)))); aux path tl in let where = if path.[0] = '/' then "/" else "" in aux where components -let chmod mode filename = - Unix.chmod filename mode - (** {2 Filesystem} *) let input_file fname =