fix: startup when gamedir appears on path multiple times (ref #704)

This commit is contained in:
jeefo 2025-09-03 16:19:07 +03:00
commit 1cc5f452ff
No known key found for this signature in database
GPG key ID: D696786B81B667C8

View file

@ -490,7 +490,7 @@ StringRef BotStorage::getRunningPathVFS () {
if (path.empty ()) { if (path.empty ()) {
path = getRunningPath (); path = getRunningPath ();
path = path.substr (path.find (game.getRunningModName ())); // skip to the game dir path = path.substr (path.rfind (game.getRunningModName ())); // skip to the game dir
path = path.substr (path.find (kPathSeparator) + 1); // skip the game dir path = path.substr (path.find (kPathSeparator) + 1); // skip the game dir
} }
return path; return path;