mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 18:23:53 +00:00
handle other Windows-specific path issues regarding OpenCS resources handling
This commit is contained in:
parent
58b6e757e3
commit
f2d991505e
1 changed files with 4 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include <algorithm>
|
||||
|
||||
#include <OgreResourceGroupManager.h>
|
||||
|
||||
|
@ -55,6 +56,7 @@ CSMWorld::Resources::Resources (const std::string& baseDirectory, UniversalId::T
|
|||
|
||||
std::string file = iter->substr (baseSize+1);
|
||||
mFiles.push_back (file);
|
||||
std::replace (file.begin(), file.end(), '\\', '/');
|
||||
mIndex.insert (std::make_pair (
|
||||
Misc::StringUtils::lowerCase (file), static_cast<int> (mFiles.size())-1));
|
||||
}
|
||||
|
@ -90,6 +92,8 @@ int CSMWorld::Resources::searchId (const std::string& id) const
|
|||
{
|
||||
std::string id2 = Misc::StringUtils::lowerCase (id);
|
||||
|
||||
std::replace (id2.begin(), id2.end(), '\\', '/');
|
||||
|
||||
std::map<std::string, int>::const_iterator iter = mIndex.find (id2);
|
||||
|
||||
if (iter==mIndex.end())
|
||||
|
|
Loading…
Reference in a new issue