Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Zheng Yile
codiaclient
Commits
19ab30f9
Commit
19ab30f9
authored
Jun 28, 2021
by
Zheng Yile
Browse files
尝试修改gui缓存路径
parent
0b9dabd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
loginFunctions.py
View file @
19ab30f9
...
...
@@ -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"
]:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment