diff options
author | Tim Jenssen <tim.jenssen@nokia.com> | 2012-03-26 14:47:00 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@nokia.com> | 2012-03-27 17:00:24 +0200 |
commit | bc6092a49b671e048ac008d5e895ff66c1b461ea (patch) | |
tree | c1646e2492ffaec96c20a38e6d1345a71ac52d2b /tools/repogen/repogen.cpp | |
parent | 6df4c5d7d7469227e61bfc14fb7525df7028487b (diff) |
take into account that we could have more then one updates.xml
Change-Id: If754c5885e3c1bf2b15773d39b14d3a7edfe6039
Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
Diffstat (limited to 'tools/repogen/repogen.cpp')
-rw-r--r-- | tools/repogen/repogen.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/repogen/repogen.cpp b/tools/repogen/repogen.cpp index 4a32fa257..fb4122bb4 100644 --- a/tools/repogen/repogen.cpp +++ b/tools/repogen/repogen.cpp @@ -39,6 +39,7 @@ #include <lib7z_facade.h> #include <QtCore/QDir> +#include <QtCore/QDirIterator> #include <QtCore/QFileInfo> #include <iostream> @@ -220,7 +221,11 @@ int main(int argc, char** argv) settings.applicationVersion(), redirectUpdateUrl); QInstallerTools::compressMetaDirectories(metaTmp, metaTmp, pathToVersionMapping); - QFile::remove(QFileInfo(repositoryDir, QLatin1String("Updates.xml")).absoluteFilePath()); + QDirIterator it(repositoryDir, QStringList(QLatin1String("Updates*.xml")), QDir::Files | QDir::CaseSensitive); + while (it.hasNext()) { + it.next(); + QFile::remove(it.fileInfo().absoluteFilePath()); + } moveDirectoryContents(metaTmp, repositoryDir); return 0; } catch (const Lib7z::SevenZipException &e) { |