Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit 4aba8fb

Browse files
committed
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.
1 parent 5cc6a91 commit 4aba8fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

geeknote/geeknote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ def _editWithEditorInThread(
949949
result = True
950950
prevChecksum = editor.getTempfileChecksum()
951951
while True:
952-
if prevChecksum != editor.getTempfileChecksum() and result:
952+
if (prevChecksum != editor.getTempfileChecksum() or not note) and result:
953953
newContent = open(editor.tempfile, "r").read()
954954
ext = os.path.splitext(editor.tempfile)[1]
955955
mapping = {

0 commit comments

Comments
 (0)