From c7aadf89c80324d1ff1d47fcb80d2b47d03182c6 Mon Sep 17 00:00:00 2001 From: Zach Berwaldt Date: Sat, 15 Jun 2024 11:13:29 -0400 Subject: refine Organize command --- note_tools/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/note_tools/commands.py b/note_tools/commands.py index 2a89a32..3c26915 100644 --- a/note_tools/commands.py +++ b/note_tools/commands.py @@ -13,6 +13,8 @@ class OrganizeNotesCommand(sublime_plugin.WindowCommand): project_data = self.window.project_data() + notes_path = None + if project_data and "folders" in project_data: for folder in project_data['folders']: folder_path = folder['path'] @@ -21,7 +23,7 @@ class OrganizeNotesCommand(sublime_plugin.WindowCommand): notes_path = folder_path break - if notes_path: + if notes_path is not None: notes = self.list_files(notes_path, ['.sublime-project', '.sublime-workspace']) for note in notes: year, month = self.parse_file_date(note.name) -- cgit v1.1