From 7e496bd51bde8b5b6a4b2b808b7633e6fdb5d72c Mon Sep 17 00:00:00 2001 From: William Minchin Date: Thu, 2 Jan 2014 18:05:10 -0700 Subject: [PATCH] Still touch the tempfile before editing --- jrnl/util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jrnl/util.py b/jrnl/util.py index 7191cb69..87271d28 100644 --- a/jrnl/util.py +++ b/jrnl/util.py @@ -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)