mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-25 18:39:42 +00:00
Fix bug where new addons could not be created since commit ff072441fd
.
This commit is contained in:
parent
40bacc04c5
commit
60d5ea7ab6
1 changed files with 9 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue