diff --git a/apps/opencs/model/world/resources.cpp b/apps/opencs/model/world/resources.cpp index aeef59fe7..13c8df84d 100644 --- a/apps/opencs/model/world/resources.cpp +++ b/apps/opencs/model/world/resources.cpp @@ -3,6 +3,7 @@ #include #include +#include #include @@ -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 (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::const_iterator iter = mIndex.find (id2); if (iter==mIndex.end())