mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 03:28:31 +02:00
Still touch the tempfile before editing
This commit is contained in:
parent
3fadd6e933
commit
7e496bd51b
1 changed files with 2 additions and 0 deletions
|
@ -126,6 +126,8 @@ def load_and_fix_json(json_path):
|
|||
|
||||
def get_text_from_editor(config, template=""):
|
||||
tmpfile = os.path.join(tempfile.gettempdir(), "jrnl")
|
||||
with open(tmpfile, 'w'):
|
||||
pass
|
||||
if template:
|
||||
with codecs.open(tmpfile, 'w', "utf-8") as f:
|
||||
f.write(template)
|
||||
|
|
Loading…
Add table
Reference in a new issue