From 4aba8fb418b71c40a52a8948540d5523da1b597e Mon Sep 17 00:00:00 2001
From: Jeff Kowalski <jeff.kowalski@gmail.com>
Date: Mon, 30 Sep 2019 23:33:27 -0700
Subject: [PATCH] Fix issue #121 - notes with resources but no content weren't
 created

When creating a note, but not explicitly providing content, geeknote
assumes the editor should be used to collect user input.  It then
creates a note only when the content is changed.  If the content
remains empty, no note would have been created.

Now, we create the new note anyway even when the empty content is unchanged.
Perhaps a better fix would be to create the note only if a resource
were provided in that case.  I'm not sure that's obvious behavior though.
---
 geeknote/geeknote.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/geeknote/geeknote.py b/geeknote/geeknote.py
index b2ebf69..03a63a2 100755
--- a/geeknote/geeknote.py
+++ b/geeknote/geeknote.py
@@ -949,7 +949,7 @@ def _editWithEditorInThread(
         result = True
         prevChecksum = editor.getTempfileChecksum()
         while True:
-            if prevChecksum != editor.getTempfileChecksum() and result:
+            if (prevChecksum != editor.getTempfileChecksum() or not note) and result:
                 newContent = open(editor.tempfile, "r").read()
                 ext = os.path.splitext(editor.tempfile)[1]
                 mapping = {