summaryrefslogtreecommitdiffstats
path: root/tools/repogen/repogen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/repogen/repogen.cpp')
-rw-r--r--tools/repogen/repogen.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/repogen/repogen.cpp b/tools/repogen/repogen.cpp
index 922bdfe30..236b0b901 100644
--- a/tools/repogen/repogen.cpp
+++ b/tools/repogen/repogen.cpp
@@ -156,11 +156,15 @@ int main(int argc, char** argv)
return printErrorAndUsageAndExit(QCoreApplication::translate("QInstaller",
"Error: Packages parameter missing argument"));
}
-
- if (!QFileInfo(args.first()).exists()) {
+ const QDir dir(args.first());
+ if (!dir.exists()) {
return printErrorAndUsageAndExit(QCoreApplication::translate("QInstaller",
"Error: Package directory not found at the specified location"));
}
+ if (dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot).isEmpty()) {
+ return printErrorAndUsageAndExit(QCoreApplication::translate("QInstaller",
+ "Error: Package directory is empty"));
+ }
packagesDirectories.append(args.first());
args.removeFirst();