mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-07 00:36:13 +02:00
Properly initialise journal files after creating them
This commit is contained in:
parent
4955902702
commit
75ecc0dbbd
4 changed files with 36 additions and 16 deletions
|
@ -50,3 +50,10 @@ class EncryptedJournal(Journal.Journal):
|
|||
journal = Fernet(key).encrypt(text.encode('utf-8'))
|
||||
with open(filename, 'w') as f:
|
||||
f.write(journal)
|
||||
|
||||
@classmethod
|
||||
def _create(cls, filename, password):
|
||||
key = make_key(password)
|
||||
dummy = Fernet(key).encrypt("")
|
||||
with open(filename, 'w') as f:
|
||||
f.write(dummy)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue