From d9786dfdc2ab0bb99b62ba1c4b5247cfb8b66efa Mon Sep 17 00:00:00 2001 From: "wagic.jeck" Date: Tue, 22 Sep 2009 05:33:01 +0000 Subject: [PATCH] Jeck - (Probable) fix for issue 41. Turns out AttachZipFile is very robust, and already handles all the unattach / reattach optimizing & checking for us. --- projects/mtg/include/WResourceManager.h | 1 - projects/mtg/src/WResourceManager.cpp | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/projects/mtg/include/WResourceManager.h b/projects/mtg/include/WResourceManager.h index a4fff8463..4e5cf17f7 100644 --- a/projects/mtg/include/WResourceManager.h +++ b/projects/mtg/include/WResourceManager.h @@ -196,7 +196,6 @@ private: vector managedQuads; //Statistics of record. - string attachedZip; unsigned int lastTime; int lastError; }; diff --git a/projects/mtg/src/WResourceManager.cpp b/projects/mtg/src/WResourceManager.cpp index e08357cb0..ab9ba86f4 100644 --- a/projects/mtg/src/WResourceManager.cpp +++ b/projects/mtg/src/WResourceManager.cpp @@ -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); } }