Some additional tweaks for Windows
This commit is contained in:
+7
-6
@@ -167,7 +167,7 @@ class Config:
|
||||
|
||||
if confPath is None:
|
||||
confRoot = QStandardPaths.writableLocation(QStandardPaths.ConfigLocation)
|
||||
self.confPath = path.join(confRoot, self.appHandle)
|
||||
self.confPath = path.join(path.abspath(confRoot), self.appHandle)
|
||||
else:
|
||||
logger.info("Setting config from alternative path: %s" % confPath)
|
||||
self.confPath = confPath
|
||||
@@ -186,12 +186,13 @@ class Config:
|
||||
|
||||
# If config folder does not exist, make it.
|
||||
# This assumes that the os config folder itself exists.
|
||||
if self.osWindows:
|
||||
if not path.isdir(self.confPath):
|
||||
makedirs(self.confPath)
|
||||
else:
|
||||
if not path.isdir(self.confPath):
|
||||
if not path.isdir(self.confPath):
|
||||
try:
|
||||
mkdir(self.confPath)
|
||||
except Exception as e:
|
||||
logger.error("Could not create folder: %s" % self.confPath)
|
||||
logger.error(str(e))
|
||||
return False
|
||||
|
||||
# Check if config file exists
|
||||
if path.isfile(path.join(self.confPath,self.confFile)):
|
||||
|
||||
Reference in New Issue
Block a user