From 688740cf803af51aadcaf7f13099c57b655bb150 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 14 May 2013 15:22:06 +0200 Subject: [PATCH] Remove managed subdirectories in assets when deploying to Android We need to make sure there aren't left-over subdirectories in the assets/ folder when you have used the bundling mechanism for deployment. To make this easier, we fix a bug where a missing slash would cause multiple libraryPrefix() directories with different suffixes under assets/ instead of just a single one containing everything managed by creator. When the slash is added we can simply remove the whole "assets/" + libraryPrefix() directory recursively. Task-number: QTCREATORBUG-9294 Change-Id: Ie24b55680d247df458bc70bbc15abdce51605627 Reviewed-by: Daniel Teske --- src/plugins/android/androidpackagecreationstep.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/android/androidpackagecreationstep.cpp b/src/plugins/android/androidpackagecreationstep.cpp index c80111d629e..ac0e50b2925 100644 --- a/src/plugins/android/androidpackagecreationstep.cpp +++ b/src/plugins/android/androidpackagecreationstep.cpp @@ -559,7 +559,7 @@ void AndroidPackageCreationStep::collectFiles(QList *deployList, destinationPath = androidLibPath + QLatin1Char('/') + garbledFileName; shouldStrip = true; } else { - garbledFileName = AndroidManager::libraryPrefix() + fullFileName; + garbledFileName = AndroidManager::libraryPrefix() + QLatin1Char('/') + fullFileName; destinationPath = androidAssetsPath + garbledFileName; } @@ -591,6 +591,8 @@ void AndroidPackageCreationStep::removeManagedFilesFromPackage() } } } + + removeDirectory(m_androidDir.toString() + QLatin1String("/assets/") + AndroidManager::libraryPrefix()); } void AndroidPackageCreationStep::copyFilesIntoPackage(const QList &deployList)