Merge pull request #3683 from matt335672/fix_race_g_create_path

Fix Possible race condition in g_create_path()
This commit is contained in:
matt335672
2025-12-03 11:07:37 +00:00
committed by GitHub
+4 -1
View File
@@ -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;