mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 07:45:39 +00:00
Invert condition
Rebased to account for upstream normalising slashes to replace forward slashes with backslashes, simplifying the part that needed to check for both variants. Perhaps if it'd been like that in the first place, I wouldn't have made the mistake that made the original version of this commit necessary.
This commit is contained in:
parent
575367bc18
commit
f30676cbc7
1 changed files with 2 additions and 2 deletions
|
@ -72,8 +72,8 @@ std::string Misc::ResourceHelpers::correctResourcePath(std::string_view topLevel
|
|||
bool needsPrefix = true;
|
||||
for (std::string_view alternativeDirectory : alternativeDirectories)
|
||||
{
|
||||
if (!correctedPath.starts_with(alternativeDirectory) || correctedPath.size() <= alternativeDirectory.size()
|
||||
|| correctedPath[alternativeDirectory.size()] != '\\')
|
||||
if (correctedPath.starts_with(alternativeDirectory) && correctedPath.size() > alternativeDirectory.size()
|
||||
&& correctedPath[alternativeDirectory.size()] == '\\')
|
||||
{
|
||||
needsPrefix = false;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue