Jeck - (Probable) fix for issue 41. Turns out AttachZipFile is very robust, and already handles all the unattach / reattach optimizing & checking for us.

This commit is contained in:
wagic.jeck
2009-09-22 05:33:01 +00:00
parent 694df9dc13
commit d9786dfdc2
2 changed files with 1 additions and 7 deletions

View File

@@ -196,7 +196,6 @@ private:
vector<WManagedQuad*> managedQuads;
//Statistics of record.
string attachedZip;
unsigned int lastTime;
int lastError;
};

View File

@@ -668,12 +668,7 @@ string WResourceManager::cardFile(const string filename, const string specific){
char zipname[512];
sprintf(zipname, "Res/sets/%s/%s.zip", set.c_str(),set.c_str());
if (fileOK(zipname)){
if(attachedZip != zipname)
{
fs->DetachZipFile();
attachedZip = zipname;
fs->AttachZipFile(zipname);
}
fs->AttachZipFile(zipname);
return filename.substr(i+1);
}
}