mirror of
https://github.com/OpenMW/openmw.git
synced 2026-02-01 16:18:25 +00:00
Use ranges::replace
This commit is contained in:
parent
853a6d1922
commit
9cac246337
1 changed files with 1 additions and 2 deletions
|
|
@ -39,8 +39,7 @@ namespace Files::Wine
|
|||
std::string mwpath = line.substr(keyStart.size(), line.rfind('"') - keyStart.size());
|
||||
if (mwpath.empty())
|
||||
break;
|
||||
std::transform(
|
||||
mwpath.begin(), mwpath.end(), mwpath.begin(), [](char c) { return c == '\\' ? '/' : c; });
|
||||
std::ranges::replace(mwpath, '\\', '/');
|
||||
// Change drive letter to lowercase, so we could use ~/.wine/dosdevices symlinks
|
||||
mwpath[0] = Misc::StringUtils::toLower(mwpath[0]);
|
||||
std::filesystem::path installPath = homePath / ".wine/dosdevices/" / mwpath;
|
||||
|
|
|
|||
Loading…
Reference in a new issue