mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-23 15:40:42 +00:00
handle other Windows-specific path issues regarding OpenCS resources handling
This commit is contained in:
parent
58b6e757e3
commit
f2d991505e
@ -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…
x
Reference in New Issue
Block a user