mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
parent
93be8b2cd8
commit
dc10a55a75
1 changed files with 1 additions and 1 deletions
|
|
@ -321,7 +321,7 @@ let with_temp_dir ?(mode=0o700) ?dir pat (f: string -> 'a) : 'a =
|
||||||
let raise_err msg = raise (Sys_error msg) in
|
let raise_err msg = raise (Sys_error msg) in
|
||||||
let rec loop count =
|
let rec loop count =
|
||||||
if count < 0 then (
|
if count < 0 then (
|
||||||
raise_err "mk_temp_dir: too many failing attemps"
|
raise_err "mk_temp_dir: too many failing attempts"
|
||||||
) else (
|
) else (
|
||||||
let dir = Filename.concat dir (pat ^ rand_digits_ ()) in
|
let dir = Filename.concat dir (pat ^ rand_digits_ ()) in
|
||||||
match Unix.mkdir dir mode with
|
match Unix.mkdir dir mode with
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue