Skip to content

Commit ba9c312

Browse files
author
liangzhongxin
committed
Fix slow performance on second and subsequent application startups
1 parent e1a1dc1 commit ba9c312

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

COMTool/parameters.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ def get_config_path(configFileName):
4242
if sys.platform.startswith('linux') or sys.platform.startswith('darwin') or sys.platform.startswith('freebsd'):
4343
configFileDir = os.path.join(os.getenv("HOME"), ".config/comtool")
4444
configFilePath = get_config_path(configFileName)
45+
elif sys.platform.startswith("win"):
46+
appdata = os.getenv("APPDATA") or os.path.expanduser("~\\AppData\\Roaming")
47+
configFileDir = os.path.join(appdata, appName)
48+
configFilePath = get_config_path(configFileName)
4549
else:
4650
configFileDir = os.path.abspath(os.getcwd())
4751
configFilePath = os.path.join(configFileDir, configFileName)

0 commit comments

Comments
 (0)