summaryrefslogtreecommitdiffstats
path: root/fixPermissions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fixPermissions.cpp')
-rw-r--r--fixPermissions.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/fixPermissions.cpp b/fixPermissions.cpp
index 1d2c51829..5d4b0d208 100644
--- a/fixPermissions.cpp
+++ b/fixPermissions.cpp
@@ -443,13 +443,17 @@ int fixPermissions::getPackages() {
xmlFile.read(&xmlBuf[0], len);
xmlBuf[len] = '\0';
xml_document<> pkgDoc;
+ LOGINFO("parsing package, %i...\n", len);
pkgDoc.parse<parse_full>(&xmlBuf[0]);
xml_node<> * pkgNode = pkgDoc.first_node("packages");
+ if (pkgNode == NULL) {
+ LOGERR("No packages found to fix.\n");
+ return -1;
+ }
xml_node <> * next = pkgNode->first_node("package");
-
if (next == NULL) {
- LOGERR("No packages found to fix.\n");
+ LOGERR("No package found to fix.\n");
return -1;
}