fix: startup when gamedir appears on path multiple times (ref #704)
This commit is contained in:
parent
95f907434b
commit
1cc5f452ff
1 changed files with 1 additions and 1 deletions
|
|
@ -490,7 +490,7 @@ StringRef BotStorage::getRunningPathVFS () {
|
|||
if (path.empty ()) {
|
||||
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
|
||||
}
|
||||
return path;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue