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: 0.4.95@7852~148 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=1e137a28e38b0a972bf52cdaa22c816559abac6f;p=helm.git we chmod the created directories to override the umask settings --- diff --git a/components/extlib/hExtlib.ml b/components/extlib/hExtlib.ml index bf3bb2574..9e2277b43 100644 --- a/components/extlib/hExtlib.ml +++ b/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 =