diff --git a/components/misc/resourcehelpers.cpp b/components/misc/resourcehelpers.cpp index c9a3591046..119936f2ab 100644 --- a/components/misc/resourcehelpers.cpp +++ b/components/misc/resourcehelpers.cpp @@ -69,7 +69,8 @@ std::string Misc::ResourceHelpers::correctResourcePath( bool needsPrefix = true; for (std::string_view potentialTopLevelDirectory : topLevelDirectories) { - if (correctedPath.starts_with(potentialTopLevelDirectory) && correctedPath.size() > potentialTopLevelDirectory.size() + if (correctedPath.starts_with(potentialTopLevelDirectory) + && correctedPath.size() > potentialTopLevelDirectory.size() && correctedPath[potentialTopLevelDirectory.size()] == '\\') { needsPrefix = false;