Skip to content

Commit 05e7f70

Browse files
author
kviktor
committed
workaround for skipped directories
1 parent 558a94f commit 05e7f70

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tools/linuxdeployqt/shared.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,8 +1504,15 @@ void deployQmlImport(const QString &appDirPath, const QSet<QString> &rpaths, con
15041504

15051505
// Skip already deployed imports. This can happen in cases like "QtQuick.Controls.Styles",
15061506
// where deploying QtQuick.Controls will also deploy the "Styles" sub-import.
1507-
if (QDir().exists(importDestinationPath))
1508-
return;
1507+
// NOTE: this stops the deployment of certain imports if there is a folder in them, for example
1508+
// - if QtQuick.Controls.Styles is already there QtQuick.Controls is skipped
1509+
// - if QtQuick.Extras.Private is there QtQuick.Extras is skipped
1510+
QDir destDir(importDestinationPath);
1511+
if (destDir.exists()) {
1512+
destDir.setFilter(QDir::Files | QDir::NoDotAndDotDot);
1513+
if(destDir.entryInfoList().length() > 0)
1514+
return;
1515+
}
15091516

15101517
recursiveCopyAndDeploy(appDirPath, rpaths, importSourcePath, importDestinationPath);
15111518
}

0 commit comments

Comments
 (0)