Skip to content
Browse files

Merge pull request #232 from avsm/fix-parallel-mkdir

deal with a mkdir returning EEXIST (which can happen if something else i...
  • Loading branch information...
2 parents 423cafe + 0840964 commit a1b41d707e4e1f15f9d5eabc4de3fc8f456fbe93 @samoht samoht committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/opamSystem.ml
View
4 src/opamSystem.ml
@@ -71,8 +71,10 @@ let log_file () =
!OpamGlobals.root_dir / "log" / f
let safe_mkdir dir =
+ let open Unix in
if not (Sys.file_exists dir) then
- Unix.mkdir dir 0o755
+ try mkdir dir 0o755
+ with Unix_error(EEXIST,_,_) -> ()
let mkdir dir =
let rec aux dir =

0 comments on commit a1b41d7

Please sign in to comment.
Something went wrong with that request. Please try again.