From b15f069996610481a6ae8aaca9b174504ac68135 Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Wed, 31 Aug 2022 12:44:40 +0300 Subject: Windows: fix installation error with concurrent Extract operations There was an issue with the Extract operations when using the same "targetDir" argument for multiple archives. The DirectoryGuard object creating the missing leading directories would occasionally run into a race condition when multiple threads competed with creating the directories. Fix by adding installer specific implementation similar to QDir::mkpath(), but which checks if the directory was created elsewhere at every directory level. Also convert an existing similar case with the Extract operation to use the new function. Task-number: QTIFW-2752 Change-Id: I4451e931309edb536294314b11c903189dacf2f0 Reviewed-by: Katja Marttila --- src/libs/installer/fileutils.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libs/installer/fileutils.h') diff --git a/src/libs/installer/fileutils.h b/src/libs/installer/fileutils.h index 8b79ce052..1114cd60c 100644 --- a/src/libs/installer/fileutils.h +++ b/src/libs/installer/fileutils.h @@ -89,6 +89,7 @@ private: void INSTALLER_EXPORT mkdir(const QString &path); void INSTALLER_EXPORT mkpath(const QString &path); + bool INSTALLER_EXPORT createDirectoryWithParents(const QString &path); #ifdef Q_OS_MACOS void INSTALLER_EXPORT mkalias(const QString &path, const QString &alias); #endif -- cgit v1.2.3