summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2017-12-14 21:43:59 +0100
committerEthan Yonker <dees_troy@teamw.in>2017-12-15 19:48:49 +0100
commitecbd3e8ba9d84eca9d4fdea9b24717364f81a668 (patch)
treed3027aeb161e13673416d1684e6f4e47c85241d0 /gui
parentFix build error in AOSP 8.1.0 r1 tree (diff)
parentMerge cherrypicks of [3156476, 3155698, 3156194, 3156639, 3156018, 3156477, 3156098, 3156099, 3156100, 3156101, 3156102, 3158393, 3155699, 3155700, 3156195, 3156196, 3156019, 3156020, 3158394] into oc-mr1-release (diff)
downloadandroid_bootable_recovery-ecbd3e8ba9d84eca9d4fdea9b24717364f81a668.tar
android_bootable_recovery-ecbd3e8ba9d84eca9d4fdea9b24717364f81a668.tar.gz
android_bootable_recovery-ecbd3e8ba9d84eca9d4fdea9b24717364f81a668.tar.bz2
android_bootable_recovery-ecbd3e8ba9d84eca9d4fdea9b24717364f81a668.tar.lz
android_bootable_recovery-ecbd3e8ba9d84eca9d4fdea9b24717364f81a668.tar.xz
android_bootable_recovery-ecbd3e8ba9d84eca9d4fdea9b24717364f81a668.tar.zst
android_bootable_recovery-ecbd3e8ba9d84eca9d4fdea9b24717364f81a668.zip
Diffstat (limited to 'gui')
-rw-r--r--gui/pages.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/gui/pages.cpp b/gui/pages.cpp
index 1199a2876..a3a1df325 100644
--- a/gui/pages.cpp
+++ b/gui/pages.cpp
@@ -1370,13 +1370,19 @@ int PageManager::LoadPackage(std::string name, std::string package, std::string
tw_h_offset = 0;
if (!TWFunc::Path_Exists(package))
return -1;
+#ifdef USE_MINZIP
if (sysMapFile(package.c_str(), &map) != 0) {
+#else
+ if (!map.MapFile(package)) {
+#endif
LOGERR("Failed to map '%s'\n", package.c_str());
goto error;
}
if (!zip.Open(package.c_str(), &map)) {
LOGERR("Unable to open zip archive '%s'\n", package.c_str());
+#ifdef USE_MINZIP
sysReleaseMap(&map);
+#endif
goto error;
}
ctx.zip = &zip;
@@ -1418,7 +1424,9 @@ int PageManager::LoadPackage(std::string name, std::string package, std::string
if (ctx.zip) {
ctx.zip->Close();
+#ifdef USE_MINZIP
sysReleaseMap(&map);
+#endif
}
return ret;
@@ -1426,7 +1434,9 @@ error:
// Sometimes we get here without a real error
if (ctx.zip) {
ctx.zip->Close();
+#ifdef USE_MINZIP
sysReleaseMap(&map);
+#endif
}
return -1;
}