From 9ffdf6287d4ab3261cec58f7b9535fe65d448594 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sat, 4 Apr 2026 00:26:17 +0200 Subject: [PATCH] fix: import folder scans project's folder_path not current_dir Was scanning state.current_dir which could differ from the project's actual folder, causing no JSON files to be found. Co-Authored-By: Claude Sonnet 4.6 --- tab_projects_ng.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tab_projects_ng.py b/tab_projects_ng.py index ddc1570..eca356f 100644 --- a/tab_projects_ng.py +++ b/tab_projects_ng.py @@ -216,8 +216,10 @@ def render_projects_tab(state: AppState): async def _import_folder(state: AppState, project_id: int, project_name: str, refresh_fn): - """Bulk import all .json files from current directory into a project.""" - json_files = sorted(state.current_dir.glob('*.json')) + """Bulk import all .json files from the project's folder_path into a project.""" + proj = state.db.get_project(project_name) + scan_dir = Path(proj['folder_path']) if proj else state.current_dir + json_files = sorted(scan_dir.glob('*.json')) json_files = [f for f in json_files if f.name not in ( '.editor_config.json', '.editor_snippets.json')]