encrypt save support, smileys fix, bug fixes
This commit is contained in:
parent
dd53c6a842
commit
42aa102d1d
9 changed files with 18 additions and 13 deletions
|
|
@ -144,9 +144,11 @@ class Settings(dict, Singleton):
|
|||
text = json.dumps(self)
|
||||
inst = LibToxEncryptSave.get_instance()
|
||||
if inst.has_password():
|
||||
text = inst.pass_encrypt(text)
|
||||
text = bytes(inst.pass_encrypt(bytes(text, 'utf-8')))
|
||||
else:
|
||||
text = bytes(text, 'utf-8')
|
||||
with open(self.path, 'wb') as fl:
|
||||
fl.write(bytes(text, 'UTF-8'))
|
||||
fl.write(text)
|
||||
|
||||
def close(self):
|
||||
path = Settings.get_default_path() + 'toxygen.json'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue