From e3dd92ef71ecd06ef2a3ef2ef49beccb5d22cc0f Mon Sep 17 00:00:00 2001 From: Lars Henriksen Date: Sun, 15 Nov 2020 09:21:47 +0100 Subject: Do not remove an empty note file after edit session Signed-off-by: Lars Henriksen Signed-off-by: Lukas Fleischer --- src/note.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/note.c') diff --git a/src/note.c b/src/note.c index 40e0882..4f20d9d 100644 --- a/src/note.c +++ b/src/note.c @@ -94,9 +94,7 @@ void edit_note(char **note, const char *editor) const char *arg[] = { editor, tmppath, NULL }; wins_launch_external(arg); - if (io_file_is_empty(tmppath) > 0) { - erase_note(note); - } else if ((fp = fopen(tmppath, "r"))) { + if ((fp = fopen(tmppath, "r"))) { sha1_stream(fp, sha1); fclose(fp); *note = sha1; -- cgit v1.2.3-54-g00ecf