fn ensure_directories_are_set_up_correctly()

in focus/internals/src/lib/model/data_paths.rs [40:60]


    fn ensure_directories_are_set_up_correctly(&self) -> Result<()> {
        if !self.focus_dir.is_dir() {
            warn!(
                focus_dir = ?self.focus_dir,
                "The repo does not have a 'focus' directory at the top of the working tree; no focus configuration will be applied",
            );
        } else if !self.project_dir.is_dir() {
            warn!(
                project_dir = ?self.project_dir,
                "The repo does not have a 'focus/projects' directory at the top of the working tree; no focus projects will be loaded",
            );
        }

        let dirs_to_create = vec![self.data_dir.as_path()];
        for dir in dirs_to_create {
            std::fs::create_dir_all(dir).with_context(|| {
                format!("Failed to create directory hierarchy '{}'", &dir.display())
            })?;
        }
        Ok(())
    }