build_roots


Description:

public ArrayList<Folder> build_roots () throws Error

Build list of root directories that need write access for bubblewrap sandboxing.

Returns an ArrayList of Folder objects that need to be writable in the sandbox. Follows symlinks within the project to find all directories that need write access. For Phase 1, returns folders with realpaths (actual filesystem paths with symlinks resolved). In later phases, will return folders with overlay mount points instead of realpaths.

Algorithm: 1. Collect all Folder objects from project_files.folder_map (paths are already realpaths) 2. Sort folders by path 3. Add first folder, then iterate through and add if next folder doesn't start with last added (this avoids duplicates where one folder is a parent of another)

Returns:

ArrayList of Folder objects that need write access