mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 13:08:31 +02:00
Added @hollystyles' fix for Issue #415
Fixes the problem with permissions when trying to use an external editor to edit old entries on Windows.
This commit is contained in:
parent
f23cbf9525
commit
212c43a773
1 changed files with 1 additions and 0 deletions
|
@ -127,6 +127,7 @@ def load_and_fix_json(json_path):
|
||||||
|
|
||||||
def get_text_from_editor(config, template=""):
|
def get_text_from_editor(config, template=""):
|
||||||
_, tmpfile = tempfile.mkstemp(prefix="jrnl", text=True, suffix=".txt")
|
_, tmpfile = tempfile.mkstemp(prefix="jrnl", text=True, suffix=".txt")
|
||||||
|
os.close(_)
|
||||||
with codecs.open(tmpfile, 'w', "utf-8") as f:
|
with codecs.open(tmpfile, 'w', "utf-8") as f:
|
||||||
if template:
|
if template:
|
||||||
f.write(template)
|
f.write(template)
|
||||||
|
|
Loading…
Add table
Reference in a new issue