Cache library contents between runs.

This commit is contained in:
leo
2012-10-05 23:09:38 +00:00
parent 748ad35ff4
commit 404a67b361
7 changed files with 157 additions and 41 deletions
+11 -4
View File
@@ -31,15 +31,22 @@ bool lcZipFile::OpenRead(const char* FilePath)
return true;
}
bool lcZipFile::OpenWrite(const char* FilePath)
bool lcZipFile::OpenWrite(const char* FilePath, bool Append)
{
lcDiskFile* File = new lcDiskFile();
mFile = File;
bool Exists = true;
if (!File->Open(FilePath, "r+b") || !Open())
if (Append)
{
if (!File->Open(FilePath, "r+b") || !Open())
{
delete File;
mFile = NULL;
return false;
}
}
else
{
Exists = false;
mNumEntries = 0;
mCentralDirSize = 0;
mCentralDirOffset = 0;