Zip - unzip problem....
-
So I have 6 zip files:
SampleFiles01.zip
SampleFiles02.zip
SampleFiles03.zip
SampleFiles04.zip
SampleFiles05.zip
SampleFiles06.zipThey are all about 2.2GB in size....
- my app finds them fine and unzips the first one correctly, it then goes on to unzip the following ones very quickly - and instead of placing the correct data into each of the ch1 files it creates "little" ch1 files (each of them 32 KB in size)
What am I doing wrong?
heres my unzip code:
function processZipListItem() { zipFileCollection[zipListPosition] = zipFolder.getChildFile(zipDestinations[zipListPosition].File); writeLog("Extracting:" + zipDestinations[zipListPosition].File + " to:" + zipDestinations[zipListPosition].Destination); //zipFileTargetDirectories[zipListPosition] = zipFileCollection[zipListPosition].extractZipFile(zipDestinations[zipListPosition].Destination, true, function(zipState){ if(zipState.Status == 2) { if(zipState.Error != "") { Console.print("Zip extraction problem:" + zipState.Error); writeLog("Zip extraction problem:" + zipState.Error); writeLog(" "); writeLog(" "); unzipNotificationText1.set("text", "Unzipping problem encountered - see below..."); if (OS == WINDOWS) { unzipNotificationText2.set("text", "Please make sure you are running the installer as Admin on Windows..."); unzipNotificationText3.set("text", "(right click on the installer and select \"Run as Administrator\")"); }else{ unzipNotificationText2.set("text", ""); unzipNotificationText3.set("text", ""); } unzipNotificationPanel.showControl(true); }else{ // we are complete successfully zipListPosition++; if(zipListPosition < zipDestinations.length) { // we have more to process... processZipListItem(); return; }else{ writeLog("Zip extraction complete:"); zipCompletion(); } } } }); }
-
@Lindon I'm not 100% sure but I'd try to do it without the recursion.
This is how I'm doing it - https://github.com/davidhealey/HiseDownloadManagerToolkit/blob/master/Expansions.js#L207
-
@d-healey ok will do thanks - tho I'm beginning to think its the size of the zips themselves as the first (1.9GB) and the last (890MB) both extracted correctly...
-
@Lindon Oh yeah, if they're over 2GB you might have issues. I've never tried with files that large.
-
@d-healey said in Zip - unzip problem....:
@Lindon Oh yeah, if they're over 2GB you might have issues. I've never tried with files that large.
trying now...
-
@Lindon mine's 3.2gb and unzips fine
-
@Lindon said in Zip - unzip problem....:
@d-healey said in Zip - unzip problem....:
@Lindon Oh yeah, if they're over 2GB you might have issues. I've never tried with files that large.
trying now...
Ok so this WAS the issue - redoing the zips as 1.5GB each and they unzip correctly....