From a10fa156ef303721703b4ced11880ad79316d041 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Wed, 5 Oct 2016 11:17:51 +0200 Subject: [PATCH] Update settingsManager.py --- src/fenrir/core/settingsManager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fenrir/core/settingsManager.py b/src/fenrir/core/settingsManager.py index 4d931a2f..0d540500 100644 --- a/src/fenrir/core/settingsManager.py +++ b/src/fenrir/core/settingsManager.py @@ -26,7 +26,7 @@ class settingsManager(): self.env = environment def shutdown(self): pass - def loadShortcuts(self, kbConfigPath='../../config/keyboard/desktop.conf'): + def loadShortcuts(self, kbConfigPath=os.path.dirname(os.path.realpath(__main__.__file__)) + '/../../config/keyboard/desktop.conf'): kbConfig = open(kbConfigPath,"r") while(True): line = kbConfig.readline() @@ -159,8 +159,8 @@ class settingsManager(): environment['runtime']['debug'] = debug.debug() environment['runtime']['debug'].initialize(environment) if not os.path.exists(settingsRoot): - if os.path.exists('../../config/'): - settingsRoot = '../../config/' + if os.path.exists(os.path.dirname(os.path.realpath(__main__.__file__)) +'/../../config/'): + settingsRoot = os.path.dirname(os.path.realpath(__main__.__file__)) +'/../../config/' else: return None