09-26-2013 06:53 AM - edited 09-26-2013 06:55 AM
I am unable to read the contents of zip files on BlackBerry 10.2 using getFileDataFromZip
It gets as far as support\zip_support\unzip.cpp Line 617
The call to the macro ZOPEN64 always returns NULL
I have checked the path to the file and checked I can open the file using fopen
This is the same if it is a bundled resource or downloaded to getWriteablePath
Has anyone managed to read the contents of a zip file on BlackBerry?
10-02-2013 10:02 AM
I get the same behaviour that you see when doing this with a ZIP "foobar.zip" containiing a file "me.png" in the path "Resources/foobar.zip" in the project.
CCLog("XXXX Starting file test"); unsigned long filesize = 0; const char *myFile = "foobar.zip"; const char *path = CCFileUtils::sharedFileUtils()->fullPathForFilenam
e(myFile).c_str(); CCLog("XXXX path=%s", path); const char *buffer = (const char *)CCFileUtils::sharedFileUtils()->getFileDataFromZ ip(myFile, "me.png", &filesize); CCLog("XXXX filesize=%d", (int)filesize); CCLog("XXXX Ending file test");
cocos2d-x debug info XXXX Starting file test cocos2d-x debug info XXXX path=app/native/Resources/foobar.zip cocos2d-x debug info XXXX filesize=0 cocos2d-x debug info XXXX Ending file test
The full path is reported as "app/native/Resources/foobar.zip" which is correct.
Could you please log a bug: DIT ?