mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-25 21:09:43 +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 <stdexcept>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
#include <boost/filesystem.hpp>
|
||||||
|
|
||||||
#include <QAbstractItemModel>
|
#include <QAbstractItemModel>
|
||||||
|
|
||||||
#include <components/esm/esmreader.hpp>
|
#include <components/esm/esmreader.hpp>
|
||||||
|
@ -905,9 +907,12 @@ int CSMWorld::Data::getTotalRecords (const std::vector<boost::filesystem::path>&
|
||||||
|
|
||||||
for (unsigned int i = 0; i < files.size(); ++i)
|
for (unsigned int i = 0; i < files.size(); ++i)
|
||||||
{
|
{
|
||||||
reader->open(files[i].string());
|
if (boost::filesystem::exists(files[i].string()))
|
||||||
records += reader->getRecordCount();
|
{
|
||||||
reader->close();
|
reader->open(files[i].string());
|
||||||
|
records += reader->getRecordCount();
|
||||||
|
reader->close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return records;
|
return records;
|
||||||
|
|
Loading…
Reference in a new issue