mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 06:15:32 +00:00
niftest now scans BSA files in directories for nif errors
The program is explicit so the user knows exactly where the bad file is.
This commit is contained in:
parent
16d163bd3e
commit
8b48fe1cad
1 changed files with 12 additions and 3 deletions
|
@ -45,9 +45,9 @@ bool isBSA(std::string filename)
|
|||
|
||||
/// Check all the nif files in a given VFS::Archive
|
||||
/// \note Takes ownership!
|
||||
void readVFS(VFS::Archive* anArchive)
|
||||
void readVFS(VFS::Archive* anArchive,std::string archivePath = "")
|
||||
{
|
||||
VFS::Manager myManager(false);
|
||||
VFS::Manager myManager(true);
|
||||
myManager.addArchive(anArchive);
|
||||
myManager.buildIndex();
|
||||
|
||||
|
@ -62,6 +62,15 @@ void readVFS(VFS::Archive* anArchive)
|
|||
// std::cout << "Decoding: " << name << std::endl;
|
||||
Nif::NIFFile temp_nif(myManager.get(name),name);
|
||||
}
|
||||
else if(isBSA(name))
|
||||
{
|
||||
if(!archivePath.empty())
|
||||
{
|
||||
std::cout << "Reading BSA File: " << name << std::endl;
|
||||
readVFS(new VFS::BsaArchive(archivePath+name));
|
||||
std::cout << "Done with BSA File: " << name << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
|
@ -139,7 +148,7 @@ int main(int argc, char **argv)
|
|||
else if(bfs::is_directory(bfs::path(name)))
|
||||
{
|
||||
std::cout << "Reading All Files in: " << name << std::endl;
|
||||
readVFS(new VFS::FileSystemArchive(name));
|
||||
readVFS(new VFS::FileSystemArchive(name),name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue