From f2326c628c6eddff9f60ea8c0eeca6bbb93dae0a Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 10 Dec 2019 18:36:29 -0500 Subject: [PATCH] Another attempt at fixing configuration paths. --- libstormgames.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libstormgames.py b/libstormgames.py index fbe33d5..a8b54f2 100755 --- a/libstormgames.py +++ b/libstormgames.py @@ -47,17 +47,18 @@ class scoreboard(): def write_config(writeGlobal = False): if writeGlobal == False: - with open(gamePath, 'w') as configfile: + with open(gamePath + "config.ini", 'w') as configfile: localConfig.write(configfile) else: - with open(globalPath, 'w') as configfile: + with open(globalPath + "config.ini", 'w') as configfile: globalConfig.write(configfile) def read_config(section, value, readGlobal = False): if readGlobal == False: - with open(gamePath, 'r') as configfile: + with open(gamePath + "config.ini", 'r') as configfile: return localConfig.read(section, value) else: + with open(globalPath + "config.ini", 'r') as configfile: return globalConfig.read(section, value) def speak(text, interupt = True): @@ -80,8 +81,7 @@ def initialize_gui(gameTitle): global globalPath global gamePath globalPath = BaseDirectory.xdg_config_home + "/storm-games" - gamePath = globalPath + "/" + str.lower(str.replace(gameTitle, " ", "-") + "/config") - globalPath = globalPath + "/config" + gamePath = globalPath + "/" + str.lower(str.replace(gameTitle, " ", "-")) if not os.path.exists(gamePath): os.makedirs(gamePath) # Seed the random generator to the clock random.seed()