diff options
author | Ladislav Zezula <zezula@volny.cz> | 2020-12-06 11:28:10 +0100 |
---|---|---|
committer | Ladislav Zezula <zezula@volny.cz> | 2020-12-06 11:28:10 +0100 |
commit | 866269d740b32cf209e5188c5269c4118f8be07b (patch) | |
tree | 63b1366b66394057bc15d99c4d2a19d42ab6b840 /test/StormTest.cpp | |
parent | b6102b2600f792f159320439686a872a72d20c70 (diff) |
* Better checks for MPQ header v 4.0
Diffstat (limited to 'test/StormTest.cpp')
-rw-r--r-- | test/StormTest.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/test/StormTest.cpp b/test/StormTest.cpp index 3d92ae6..497ecee 100644 --- a/test/StormTest.cpp +++ b/test/StormTest.cpp @@ -332,6 +332,8 @@ static bool IsMpqExtension(LPCTSTR szFileName) return true;
if(!_tcsicmp(szExtension, _T(".SC2Map")))
return true;
+ if(!_tcsicmp(szExtension, _T(".SC2Mod")))
+ return true;
if(!_tcsicmp(szExtension, _T(".0"))) // .MPQ.0
return true;
// if(!_tcsicmp(szExtension, ".link"))
@@ -3111,6 +3113,12 @@ static int ForEachFile_OpenArchive(LPCTSTR szFullPath) nError = SearchArchive(&Logger, hMpq, 0, &dwFileCount);
SFileCloseArchive(hMpq);
}
+
+ // Show warning if no files found
+ if(dwFileCount == 0)
+ {
+ Logger.PrintMessage("Warning: no files in the archive");
+ }
}
// Correct some errors
@@ -4237,10 +4245,10 @@ int _tmain(int argc, TCHAR * argv[]) // Tests on a local listfile
//
- if(dwErrCode == ERROR_SUCCESS)
- {
- dwErrCode = TestOnLocalListFile(_T("ListFile_Blizzard.txt"));
- }
+ //if(dwErrCode == ERROR_SUCCESS)
+ //{
+ // dwErrCode = TestOnLocalListFile(_T("ListFile_Blizzard.txt"));
+ //}
//
// Open all files from the command line
|