1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 21:40:03 +00:00

Fix bug where new addons could not be created since commit ff072441fde05d189cb06cb44cc9c360690c2f09.

This commit is contained in:
cc9cii 2015-12-19 20:57:29 +11:00
parent 40bacc04c5
commit 60d5ea7ab6

View File

@ -3,6 +3,8 @@
#include <stdexcept>
#include <algorithm>
#include <boost/filesystem.hpp>
#include <QAbstractItemModel>
#include <components/esm/esmreader.hpp>
@ -904,11 +906,14 @@ int CSMWorld::Data::getTotalRecords (const std::vector<boost::filesystem::path>&
std::unique_ptr<ESM::ESMReader> reader = std::unique_ptr<ESM::ESMReader>(new ESM::ESMReader);
for (unsigned int i = 0; i < files.size(); ++i)
{
if (boost::filesystem::exists(files[i].string()))
{
reader->open(files[i].string());
records += reader->getRecordCount();
reader->close();
}
}
return records;
}