summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/extractarchiveoperation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/installer/extractarchiveoperation.cpp')
-rw-r--r--src/libs/installer/extractarchiveoperation.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/libs/installer/extractarchiveoperation.cpp b/src/libs/installer/extractarchiveoperation.cpp
index 6b9ecb687..986b9d8c8 100644
--- a/src/libs/installer/extractarchiveoperation.cpp
+++ b/src/libs/installer/extractarchiveoperation.cpp
@@ -193,20 +193,7 @@ bool ExtractArchiveOperation::performOperation()
QFileInfo targetDirectoryInfo(fileDirectory);
- // We need to create the directory structure step-by-step to avoid a rare race condition
- // on Windows. QDir::mkpath() doesn't check if the leading directories were created elsewhere
- // (like from within another thread) after the initial check that the given path requires
- // creating also parent directories.
- //
- // On Unix patforms this case is handled by QFileSystemEngine though.
- QDir resourcesDir(resourcesPath);
- if (!resourcesDir.exists())
- resourcesDir.mkdir(resourcesPath);
-
- QDir resourceFileDir(targetDirectoryInfo.absolutePath());
- if (!resourceFileDir.exists())
- resourceFileDir.mkdir(targetDirectoryInfo.absolutePath());
-
+ QInstaller::createDirectoryWithParents(targetDirectoryInfo.absolutePath());
setDefaultFilePermissions(resourcesPath, DefaultFilePermissions::Executable);
setDefaultFilePermissions(targetDirectoryInfo.absolutePath(), DefaultFilePermissions::Executable);