fix: Add parent_id to all nodes in scan system

Problem:
- All nodes (files and folders) had NULL parent_id
- Tree structure was flat (no hierarchy)
- Could not display proper folder tree

Solution:
- Add Home folder as root node
- Map folder paths to node_ids (folder_id_map)
- Set parent_id for all folders (point to parent folder's node_id)
- Set parent_id for all files (point to containing folder's node_id)
- Root directory files/folders point to Home folder

Result:
- Folders: 802 (801 + Home root)
- Files: 11857
- Total nodes: 12659
- Nodes with parent_id: 12658 (100%)
- Tree structure fully functional 

Files:
- src/scan.rs (fixed parent_id logic)
This commit is contained in:
Warren
2026-05-17 03:26:15 +08:00
parent 6b11e8fa41
commit 86fa66bb42
2 changed files with 58 additions and 10 deletions

Binary file not shown.