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:
Binary file not shown.
Reference in New Issue
Block a user