Skip to content

Conversation

@agrn
Copy link
Contributor

@agrn agrn commented May 26, 2020

When an exercise is copied to the destination directory, its
subdirectories (and their parents) are copied concurrently. This is
not an issue when there is only one subdirectory to copy, but not when
there is multiple subdirectories. In this case, for each subdirectory
of the exercise, `mkdir_p' will check if the parent directory exists.
As it does not, they will all attempt to create the parent. One of
those will succeed, and the rest will fail with EEXIST.

This solves this issue by creating the exercise's destination
directory before creating subdirectories.

This fixes #305.

When an exercise is copied to the destination directory, its
subdirectories (and their parents) are copied concurrently.  This is
not an issue when there is only one subdirectory to copy, but not when
there is multiple subdirectories.  In this case, for each subdirectory
of the exercise, `mkdir_p' will check if the parent directory exists.
As it does not, they will all attempt to create the parent.  One of
those will succeed, and the rest will fail with EEXIST.

This solves this issue by creating the exercise's destination
directory before creating subdirectories.

This fixes ocaml-sf#305.

Signed-off-by: Alban Gruin <[email protected]>
@yurug
Copy link
Collaborator

yurug commented May 27, 2020

Thanks, @agrn!

@yurug yurug merged commit 43a1d03 into ocaml-sf:master May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

First build of learn-ocaml-corpus fails

2 participants