[SOLVED] How do I access MyText.txt in MyZip.zip in assets with Android?

std::string zipFilePath = FileUtils::getInstance()->fullPathForFilename(archiveName);
if (zipFilePath.compare(archiveName) == 0) {
   CCLog("Path didn't contain: %s", zipFilePath.c_str());
    return false;}
else
    CCLog("%s opening from path : %s", archiveName, zipFilePath.c_str());
ZipFile zf(archiveName, "assets/");
long int size;
char *myText = (char*)(zf.getFileData(sourceFileName, &size));
if (myText == nullptr) {
    CCLog("%s not found in archive: %s", sourceFileName, zipFilePath.c_str());
    return false;
}

I keep getting “not found in archive” how can I get a fuller error description from the ZipFile constructor? The docs state I can and should supply “assets/” but there was a post earlier about not being able to put zips in assets but I think that was referring to FileUtils::sharedFileUtils()->getFileDataFromZip( which makes me reluctant to try it, but as I have no better error code to go on, try it I must. More information about apks and zips was provided here

I don’t suppose I’ll ever understand what an “Appendix” directory is.

But I solved my problem. ZipFile is of strictly limited utility, AFAIK. Much better instead to use:

FileUtils::sharedFileUtils->getFileDataFromZip

The header is a bit vague but you’ll figure out the rest.