Check if the target directory exists before copying
the import.
Change-Id: Id729f26b4b887c7a3b209aa88649eca3fc73b0ba
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
void deployQmlImport(const QString &appBundlePath, const QString &importSourcePath, const QString &importName)
{
QString importDestinationPath = appBundlePath + "/Contents/Resources/qml/" + importName;
+
+ // Skip already deployed imports. This can happen in cases like "QtQuick.Controls.Styles",
+ // where deploying QtQuick.Controls will also deploy the "Styles" sub-import.
+ if (QDir().exists(importDestinationPath))
+ return;
+
recursiveCopyAndDeploy(appBundlePath, importSourcePath, importDestinationPath);
}