- fixed issues with detecting older Preferences files

This commit is contained in:
Marius Stanciu
2020-07-21 14:17:58 +03:00
committed by Marius
parent 676645d6f5
commit 8a95580f15
5 changed files with 39 additions and 26 deletions

View File

@@ -361,13 +361,13 @@ class App(QtCore.QObject):
os.makedirs(self.preprocessorpaths)
App.log.debug('Created preprocessors folder: ' + self.preprocessorpaths)
# create geo_tools_db.FlatDB file if there is none
# create tools_db.FlatDB file if there is none
try:
f = open(self.data_path + '/geo_tools_db.FlatDB')
f = open(self.data_path + '/tools_db.FlatDB')
f.close()
except IOError:
App.log.debug('Creating empty geo_tool_db.FlatDB')
f = open(self.data_path + '/geo_tools_db.FlatDB', 'w')
App.log.debug('Creating empty tools_db.FlatDB')
f = open(self.data_path + '/tools_db.FlatDB', 'w')
json.dump({}, f)
f.close()
@@ -420,7 +420,7 @@ class App(QtCore.QObject):
# ############################################################################################################
# ################################# DEFAULTS - PREFERENCES STORAGE ###########################################
# ############################################################################################################
self.defaults = FlatCAMDefaults(beta=self.beta)
self.defaults = FlatCAMDefaults(beta=self.beta, version=self.version)
self.defaults["root_folder_path"] = self.app_home