Skip to content
GitLab
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
71495e4f
Commit
71495e4f
authored
Jun 28, 2021
by
Zheng Yile
Browse files
修复缓存路径
parent
52fd9590
Changes
1
Hide whitespace changes
Inline
Side-by-side
loginFunctions.py
View file @
71495e4f
...
...
@@ -9,12 +9,10 @@ from codiaclient.network import *
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
codiaclient.cachectrl
import
variables
as
cache_var
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"
)
sessionPath
=
path
.
join
(
cache_var
[
'appDataPath'
],
".gui.cache"
)
# 初始化任务,新建一个登录窗体和对应的ui
def
LoginInit
(
callback
=
None
):
...
...
@@ -113,7 +111,7 @@ def Login(callback = None):
def
LoginInfoRecv
():
from
base64
import
b64encode
try
:
with
open
(
tmp
Path
,
"wb"
)
as
configfile
:
with
open
(
session
Path
,
"wb"
)
as
configfile
:
if
uiLogin
.
checkBox
.
isChecked
():
config
=
json
.
dumps
({
"password_store_on"
:
True
,
...
...
@@ -240,7 +238,7 @@ def ResetReturn():
def
PasswordStoreRead
():
from
base64
import
b64decode
try
:
with
open
(
tmp
Path
,
"rb"
)
as
configfile
:
with
open
(
session
Path
,
"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
.
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