[fix] start search in set_gamedir from passed path

[fix] use current SETTINGS_DOTPATH value in set_gamedir search
This commit is contained in:
Jessie 2022-12-21 17:37:11 -07:00
parent 290475a9fe
commit 8f04fb1abc

View file

@ -1371,8 +1371,8 @@ def set_gamedir(path):
global GAMEDIR
Ndepth = 10
settings_path = os.path.join("server", "conf", "settings.py")
os.chdir(GAMEDIR)
settings_path = SETTINGS_DOTPATH.replace(".", os.sep) + ".py"
os.chdir(path)
for i in range(Ndepth):
gpath = os.getcwd()
if "server" in os.listdir(gpath):