From 202067d6dd4332117296ae1f4092a9bebe3638cf Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 11 Jan 2015 10:15:43 +0100 Subject: [PATCH] Fixed a bug in GAMEDIR detection in the evennia launcher --- bin/evennia | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/evennia b/bin/evennia index c329379f05..7a965af40c 100755 --- a/bin/evennia +++ b/bin/evennia @@ -362,13 +362,16 @@ def set_gamedir(path): # path at root of game dir GAMEDIR = os.path.abspath(path) elif os.path.exists(os.path.join(path, os.path.pardir, SETTINGS_PATH)): - # path given to somewhere else in gamedir - GAMEDIR = os.path.dirname(os.path.dirname(path)) + # path given to somewhere one level down + GAMEDIR = os.path.dirname(path) elif os.path.exists(os.path.join(path, os.path.pardir, os.path.pardir, SETTINGS_PATH)): # path given to somwhere two levels down + GAMEDIR = os.path.dirname(os.path.dirname(path)) + elif os.path.exists(os.path.join(path, os.path.pardir, os.path. pardir, os.path.pardir, SETTINGS_PATH)): + # path given to somewhere three levels down (custom directories) GAMEDIR = os.path.dirname(os.path.dirname(os.path.dirname(path))) else: - # Assume path given to root game dir + # we don't look further down than this ... print ERROR_NO_GAMEDIR sys.exit()