diff --git a/common/os_calls.c b/common/os_calls.c index 350a4136..2ad4c231 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -2764,7 +2764,10 @@ g_create_path(const char *path) if (!g_directory_exist(copypath)) { - if (!g_create_dir(copypath)) + // Create and check again to avoid a race with another + // process making the same traversal + (void)g_create_dir(copypath); + if (!g_directory_exist(copypath)) { status = 0; break;