Skip to content

Commit 8b488bc

Browse files
committed
🚸 Don't display wizard if there are no files yet
1 parent 8dced51 commit 8b488bc

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎octoprint_file_check/__init__.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,13 @@ def _save_last_check_info(self):
290290
def _load_last_check_info(self):
291291
path = os.path.join(self.get_plugin_data_folder(), "last_check_info.json")
292292
if not os.path.isfile(path):
293-
return {}
293+
files = self._file_manager.list_files("local", recursive=False)
294+
if not len(files.get("local", {})):
295+
# no files there, mark things as up to date
296+
self._save_last_check_info()
297+
else:
298+
# there are files, we can't take that shortcut
299+
return {}
294300

295301
try:
296302
with open(

0 commit comments

Comments
 (0)