Skip to content

Commit 227ca64

Browse files
committed
Update resmgr.cpp
1 parent 50f5058 commit 227ca64

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

kbe/src/lib/resmgr/resmgr.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,13 @@ std::string Resmgr::getPyUserScriptsPath()
490490
{
491491
static std::string path = "";
492492

493-
if(path == "")
493+
if (path == "")
494494
{
495495
path = getPyUserResPath();
496-
strutil::kbe_replace(path, "/res", "/scripts");
497-
strutil::kbe_replace(path, "\\res", "/scripts");
496+
497+
std::string::size_type pos = path.rfind("res");
498+
path.erase(pos, path.size() - pos);
499+
path += "scripts/";
498500
}
499501

500502
return path;

0 commit comments

Comments
 (0)