Fix backup of datadata

Change-Id: Ib0098542599283787592ba08caa070dc818d6111
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index d7f1600..dd2dfd2 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -865,7 +865,7 @@
 					}
 				}
 			} else {
-				LOGERR("Unable to locate '%s' partition for restoring.\n", restore_path.c_str());
+				LOGERR("Unable to locate '%s' partition for restoring (restore list).\n", restore_path.c_str());
 			}
 			start_pos = end_pos + 1;
 			end_pos = Restore_List.find(";", start_pos);
@@ -1814,9 +1814,10 @@
 			size_t start_pos = 0, end_pos = Restore_List.find(";", start_pos);
 			while (end_pos != string::npos && start_pos < Restore_List.size()) {
 				restore_path = Restore_List.substr(start_pos, end_pos - start_pos);
-				if ((restore_part = Find_Partition_By_Path(restore_path)) != NULL && !restore_part->Is_SubPartition) {
-					if (restore_part->Backup_Name == "recovery") {
+				if ((restore_part = Find_Partition_By_Path(restore_path)) != NULL) {
+					if (restore_part->Backup_Name == "recovery" || restore_part->Is_SubPartition) {
 						// Don't allow restore of recovery (causes problems on some devices)
+						// Don't add subpartitions to the list of items
 					} else {
 						struct PartitionList part;
 						part.Display_Name = restore_part->Backup_Display_Name;