Commit 19ab30f9 authored by Zheng Yile's avatar Zheng Yile
Browse files

尝试修改gui缓存路径

parent 0b9dabd7
......@@ -10,6 +10,11 @@ from codiaclient.network import _acquire_verification as _AcquireVerification
from codiaclient.report import Error as codiaError, error_translate
from codiaclient.utils import cookie_decrypt as Decrypt, cookie_encrypt as Encrypt
from codiaclientgui.utils import Font, Style
from os import environ, path, makedirs
tmpPath = path.join(environ['temp'] ,'codiaclient')
if not path.exists(tmpPath):
makedirs(tmpPath)
tmpPath = path.join(tmpPath, ".gui.cache")
# 初始化任务,新建一个登录窗体和对应的ui
def LoginInit(callback = None):
......@@ -108,7 +113,7 @@ def Login(callback = None):
def LoginInfoRecv():
from base64 import b64encode
try:
with open("config.sav", "wb") as configfile:
with open(tmpPath, "wb") as configfile:
if uiLogin.checkBox.isChecked():
config = json.dumps({
"password_store_on": True,
......@@ -235,7 +240,7 @@ def ResetReturn():
def PasswordStoreRead():
from base64 import b64decode
try:
with open("config.sav", "rb") as configfile:
with open(tmpPath, "rb") as configfile:
config = configfile.read()
config = json.loads(b64decode(config).decode())
if config["password_store_on"]:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment