summaryrefslogtreecommitdiffstats
path: root/fixPermissions.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@yahoo.com>2013-04-05 19:02:14 +0200
committerDees_Troy <dees_troy@yahoo.com>2013-04-05 19:04:38 +0200
commit34614eb94f33af6e0b5bbba6f9305645969269aa (patch)
treeb0c40c3909013f460813ddb05ae763890a858201 /fixPermissions.cpp
parentFix handling of subpartitions (diff)
downloadandroid_bootable_recovery-34614eb94f33af6e0b5bbba6f9305645969269aa.tar
android_bootable_recovery-34614eb94f33af6e0b5bbba6f9305645969269aa.tar.gz
android_bootable_recovery-34614eb94f33af6e0b5bbba6f9305645969269aa.tar.bz2
android_bootable_recovery-34614eb94f33af6e0b5bbba6f9305645969269aa.tar.lz
android_bootable_recovery-34614eb94f33af6e0b5bbba6f9305645969269aa.tar.xz
android_bootable_recovery-34614eb94f33af6e0b5bbba6f9305645969269aa.tar.zst
android_bootable_recovery-34614eb94f33af6e0b5bbba6f9305645969269aa.zip
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;
}