corrently parse utf8 from zip_io open, closes #1708

this probably failed when exporting or opening android apk files too, should fix that too.

(cherry picked from commit 1c541a2bee)
This commit is contained in:
Juan Linietsky 2016-06-18 17:29:41 -03:00 committed by Rémi Verschelde
parent 106199dfa7
commit 75cc8dc6b4
1 changed files with 5 additions and 2 deletions

View File

@ -39,11 +39,14 @@ static void* zipio_open(void* data, const char* p_fname, int mode) {
FileAccess *&f = *(FileAccess**)data; FileAccess *&f = *(FileAccess**)data;
String fname;
fname.parse_utf8(p_fname);
if (mode & ZLIB_FILEFUNC_MODE_WRITE) { if (mode & ZLIB_FILEFUNC_MODE_WRITE) {
f = FileAccess::open(p_fname,FileAccess::WRITE); f = FileAccess::open(fname,FileAccess::WRITE);
} else { } else {
f = FileAccess::open(p_fname,FileAccess::READ); f = FileAccess::open(fname,FileAccess::READ);
} }
if (!f) if (!f)