From f83081fb060818e787bfda75cf940aa341838bfc Mon Sep 17 00:00:00 2001 From: chrys Date: Sat, 8 Sep 2018 23:15:18 +0200 Subject: [PATCH] change permission after write --- src/fenrirscreenreader/core/remoteManager.py | 2 +- src/fenrirscreenreader/core/settingsManager.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fenrirscreenreader/core/remoteManager.py b/src/fenrirscreenreader/core/remoteManager.py index 7258ba45..18ba6207 100644 --- a/src/fenrirscreenreader/core/remoteManager.py +++ b/src/fenrirscreenreader/core/remoteManager.py @@ -31,7 +31,7 @@ from fenrirscreenreader.core.eventData import fenrirEventType import time import select import socket -import os, os.path, sys, stat +import os, os.path class remoteManager(): def __init__(self): diff --git a/src/fenrirscreenreader/core/settingsManager.py b/src/fenrirscreenreader/core/settingsManager.py index 0e183e3d..a39c73ca 100644 --- a/src/fenrirscreenreader/core/settingsManager.py +++ b/src/fenrirscreenreader/core/settingsManager.py @@ -5,6 +5,7 @@ # By Chrys, Storm Dragon, and contributers. import os, inspect + currentdir = os.path.dirname(os.path.realpath(os.path.abspath(inspect.getfile(inspect.currentframe())))) fenrirPath = os.path.dirname(currentdir) @@ -91,6 +92,8 @@ class settingsManager(): configFile = open(settingConfigPath, 'w') self.env['settings'].write(configFile) + configFile.close() + os.chmod(settingConfigPath, 0o666) except Exception as e: self.env['runtime']['debug'].writeDebugOut('saveSettings: save settingsfile:' + settingConfigPath + 'failed. Error:' + str(e), debug.debugLevel.ERROR) def setSetting(self, section, setting, value):