diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2022-08-31 12:44:40 +0300 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2022-09-01 15:23:53 +0000 |
commit | b15f069996610481a6ae8aaca9b174504ac68135 (patch) | |
tree | 270005140056a7223601f73160744ebdef47110a /src/libs/installer/fileutils.h | |
parent | afee8527caea5e367c134ea03da0f51240942171 (diff) |
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 <katja.marttila@qt.io>
Diffstat (limited to 'src/libs/installer/fileutils.h')
-rw-r--r-- | src/libs/installer/fileutils.h | 1 |
1 files changed, 1 insertions, 0 deletions
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 |