Commit aa180ceb authored by mercury233's avatar mercury233

fix path in archive

parent 498e3ede
......@@ -344,12 +344,12 @@ int DataManager::CardReader(int code, void* pData) {
return 0;
}
byte* DataManager::ScriptReaderEx(const char* script_name, int* slen) {
char exname[256] = "./expansions";
char exname[256] = "expansions";
strcat(exname, script_name + 1);//default script name: ./script/c%d.lua
if(ScriptReader(exname, slen))
return scriptBuffer;
else
return ScriptReader(script_name, slen);
return ScriptReader(script_name + 2, slen);
}
byte* DataManager::ScriptReader(const char* script_name, int* slen) {
wchar_t fname[256];
......
......@@ -876,7 +876,7 @@ void Game::LoadExpansions() {
if(!isdir && wcsrchr(name, '.') && !mywcsncasecmp(wcsrchr(name, '.'), L".zip", 4)) {
wchar_t fpath[1024];
myswprintf(fpath, L"./expansions/%s", name);
dataManager.FileSystem->addFileArchive(fpath);
dataManager.FileSystem->addFileArchive(fpath, true, false);
}
});
for(u32 i = 0; i < DataManager::FileSystem->getFileArchiveCount(); ++i) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment