Fix get wrong app directory from zip/ipa when there are other directory, taking "OnDemandResources" for example

This commit is contained in:
zhangbo
2021-09-06 14:43:54 +08:00
committed by Nikias Bassen
parent 7ae455ff18
commit faafec8be9
+6
View File
@@ -355,6 +355,12 @@ static int zip_get_app_directory(struct zip* zf, char** path)
len = p - name + 1;
/* make sure app directory endwith .app */
if (len < 12 || strncmp(p - 4, ".app", 4))
{
continue;
}
if (path != NULL) {
free(*path);
*path = NULL;