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:
Austin Scott 2018-11-14 09:50:31 -06:00 committed by GitHub
parent f23cbf9525
commit 212c43a773
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,6 +127,7 @@ def load_and_fix_json(json_path):
def get_text_from_editor(config, template=""):
_, tmpfile = tempfile.mkstemp(prefix="jrnl", text=True, suffix=".txt")
os.close(_)
with codecs.open(tmpfile, 'w', "utf-8") as f:
if template:
f.write(template)