From 1e137a28e38b0a972bf52cdaa22c816559abac6f Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Sun, 23 Sep 2007 19:57:56 +0000 Subject: [PATCH] we chmod the created directories to override the umask settings --- components/extlib/hExtlib.ml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 = -- 2.39.2