mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-08-14 16:56:07 -04:00
com.py: use config_path instead of data_path. Paths.py: some strings weren't appended as unicode
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
from pywintypes import com_error
|
from pywintypes import com_error
|
||||||
import win32com
|
import win32com
|
||||||
import paths
|
import paths
|
||||||
win32com.__gen_path__=paths.data_path("com_cache")
|
win32com.__gen_path__=paths.config_path(u"com_cache")
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
sys.path.append(os.path.join(win32com.__gen_path__, "."))
|
sys.path.append(os.path.join(win32com.__gen_path__, "."))
|
||||||
|
@@ -29,7 +29,7 @@ def config_path():
|
|||||||
if directory != None: path = os.path.join(directory, "config")
|
if directory != None: path = os.path.join(directory, "config")
|
||||||
elif directory == None: path = app_path(u"config")
|
elif directory == None: path = app_path(u"config")
|
||||||
elif mode == "installed":
|
elif mode == "installed":
|
||||||
path = data_path("config")
|
path = data_path(u"config")
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
log.debug("%s path does not exist, creating..." % (path,))
|
log.debug("%s path does not exist, creating..." % (path,))
|
||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
@@ -42,7 +42,7 @@ def logs_path():
|
|||||||
if directory != None: path = os.path.join(directory, "logs")
|
if directory != None: path = os.path.join(directory, "logs")
|
||||||
elif directory == None: path = app_path(u"logs")
|
elif directory == None: path = app_path(u"logs")
|
||||||
elif mode == "installed":
|
elif mode == "installed":
|
||||||
path = data_path("logs")
|
path = data_path(u"logs")
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
log.debug("%s path does not exist, creating..." % (path,))
|
log.debug("%s path does not exist, creating..." % (path,))
|
||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
|
Reference in New Issue
Block a user