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.
fix-osga-rotate-wildly
AnyOldName3 1 year ago
parent 575367bc18
commit f30676cbc7

@ -72,8 +72,8 @@ std::string Misc::ResourceHelpers::correctResourcePath(std::string_view topLevel
bool needsPrefix = true; bool needsPrefix = true;
for (std::string_view alternativeDirectory : alternativeDirectories) for (std::string_view alternativeDirectory : alternativeDirectories)
{ {
if (!correctedPath.starts_with(alternativeDirectory) || correctedPath.size() <= alternativeDirectory.size() if (correctedPath.starts_with(alternativeDirectory) && correctedPath.size() > alternativeDirectory.size()
|| correctedPath[alternativeDirectory.size()] != '\\') && correctedPath[alternativeDirectory.size()] == '\\')
{ {
needsPrefix = false; needsPrefix = false;
break; break;

Loading…
Cancel
Save