diff options
Diffstat (limited to 'test/StormTest.cpp')
-rw-r--r-- | test/StormTest.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/test/StormTest.cpp b/test/StormTest.cpp index 0993826..0c1aea4 100644 --- a/test/StormTest.cpp +++ b/test/StormTest.cpp @@ -51,7 +51,7 @@ typedef struct _LINE_INFO {
LONG nLinePos;
DWORD nLineLen;
- char * szLine;
+ const char * szLine;
} LINE_INFO, *PLINE_INFO;
//------------------------------------------------------------------------------
@@ -63,7 +63,7 @@ static const TCHAR szListFileDir[] = { '1', '9', '9', '5', ' ', '-', ' ', 'T', ' #endif
#ifdef STORMLIB_LINUX
-#define WORK_PATH_ROOT "/media/ladik/MPQs"
+#define WORK_PATH_ROOT "/media/ladik/CascStorages/MPQs"
static const TCHAR szListFileDir[] = { '1', '9', '9', '5', ' ', '-', ' ', 'T', 'e', 's', 't', ' ', 'M', 'P', 'Q', 's', '\\', 'l', 'i', 's', 't', 'f', 'i', 'l', 'e', 's', '-', (TCHAR)0xe6, (TCHAR)0x96, (TCHAR)0xB0, (TCHAR)0xE5, (TCHAR)0xBB, (TCHAR)0xBA, (TCHAR)0xE6, (TCHAR)0x96, (TCHAR)0x87, (TCHAR)0xE4, (TCHAR)0xBB, (TCHAR)0xB6, (TCHAR)0xE5, (TCHAR)0xA4, (TCHAR)0xB9, 0 };
#endif
@@ -679,10 +679,10 @@ static HANDLE InitDirectorySearch(LPCTSTR szDirectory) HANDLE hFind;
TCHAR szSearchMask[MAX_PATH];
- // Keep compilers happy
+ // Construct the directory mask
_stprintf(szSearchMask, _T("%s\\*"), szDirectory);
- // Construct the directory mask
+ // Perform the search
hFind = FindFirstFile(szSearchMask, &wf);
return (hFind != INVALID_HANDLE_VALUE) ? hFind : NULL;
@@ -2169,9 +2169,12 @@ static DWORD TestOnLocalListFile(LPCTSTR szPlainName) if(SFileOpenFileEx(NULL, szFileName1, SFILE_OPEN_LOCAL_FILE, &hFile))
{
// Retrieve the file name. It must match the name under which the file was open
- SFileGetFileName(hFile, szFileName2);
- if(strcmp(szFileName2, szFileName1))
- Logger.PrintMessage("The retrieved name does not match the open name");
+ if(FileStream_Prefix(szPlainName, NULL) == 0)
+ {
+ SFileGetFileName(hFile, szFileName2);
+ if(strcmp(szFileName2, szFileName1))
+ Logger.PrintMessage("The retrieved name does not match the open name");
+ }
// Retrieve the file size
dwFileSizeLo = SFileGetFileSize(hFile, &dwFileSizeHi);
@@ -4286,6 +4289,7 @@ int _tmain(int argc, TCHAR * argv[]) if(dwErrCode == ERROR_SUCCESS)
{
+ TestOnLocalListFile(_T("FLAT-MAP:ListFile_Blizzard.txt"));
dwErrCode = TestOnLocalListFile(_T("ListFile_Blizzard.txt"));
}
|