diff options
author | Zach Berwaldt <zberwaldt@tutamail.com> | 2024-06-15 11:13:29 -0400 |
---|---|---|
committer | Zach Berwaldt <zberwaldt@tutamail.com> | 2024-06-15 11:13:29 -0400 |
commit | c7aadf89c80324d1ff1d47fcb80d2b47d03182c6 (patch) | |
tree | cc19e2150ec869eff54c47e644c4bbac87e320dd | |
parent | 38bb828fc32d9a1c61b20bcdc576c6d8566717d2 (diff) |
refine Organize command
-rw-r--r-- | note_tools/commands.py | 4 |
1 files changed, 3 insertions, 1 deletions
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): | |||
13 | 13 | ||
14 | project_data = self.window.project_data() | 14 | project_data = self.window.project_data() |
15 | 15 | ||
16 | notes_path = None | ||
17 | |||
16 | if project_data and "folders" in project_data: | 18 | if project_data and "folders" in project_data: |
17 | for folder in project_data['folders']: | 19 | for folder in project_data['folders']: |
18 | folder_path = folder['path'] | 20 | folder_path = folder['path'] |
@@ -21,7 +23,7 @@ class OrganizeNotesCommand(sublime_plugin.WindowCommand): | |||
21 | notes_path = folder_path | 23 | notes_path = folder_path |
22 | break | 24 | break |
23 | 25 | ||
24 | if notes_path: | 26 | if notes_path is not None: |
25 | notes = self.list_files(notes_path, ['.sublime-project', '.sublime-workspace']) | 27 | notes = self.list_files(notes_path, ['.sublime-project', '.sublime-workspace']) |
26 | for note in notes: | 28 | for note in notes: |
27 | year, month = self.parse_file_date(note.name) | 29 | year, month = self.parse_file_date(note.name) |