vendredi 11 septembre 2015

Why does extracting file a file using TZipFile in iOS Simulator raise access violation?

I'm using TZipFile to extract a zip file and it's works ok in win32 but raise this exception in ios simulator. I dont know why , i've checked the location for the extraction is ok, passed the open file but when come to the extract it still raise that exception. Currently i'm not having any ios device for the real testing but please help on simulator, i'm frustrating with this.

ZipFile.Open(filePath, zmRead);//this line passed, 
ZipFile.Extract(0,dirPath );//raise EAccess exception in this line
ZipFile.Close;
//the filePath and the dirPath is the location of file and location i want to extract, it's all correct.

Or use

Zipfile.ExtractZipFile(filePath,dirPath) //still that exception

Update: OH i think i'm missing the information about my project, my working is to download a zip file which contain a .csv file from a server. I've downloaded it to the a folder in the ios simulator, the value of folder i put in to variable dirPath = Tpath.GetHomePath() + SeparatorChar + 'csv' and the variable 'fileName' is the dirPath' + name of file zip i downloaded. And i about to extract it right in that folder. So i use TZipFile to extract it and it cause up the access violation error in ZipFile.Extract line. I putted my download and extract section code to a new project and it works perfectly. I dont know why but my main project is a large prj which contain many function come up before my download section.Thanks



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire