(project_root: &Path)
| 33 | } |
| 34 | |
| 35 | pub fn project_session_db_path(project_root: &Path) -> PathBuf { |
| 36 | if is_hermes_profile_home(project_root) { |
| 37 | return hermes_profile_session_db_path(project_root); |
| 38 | } |
| 39 | resolve_layout_for_current_profile(project_root).map_or_else( |
| 40 | |_| { |
| 41 | let profile_root = default_profile_root() |
| 42 | .unwrap_or_else(|_| PathBuf::from(crate::config::TRACEDECAY_DIR)); |
| 43 | profile_sharded_data_root(&profile_root, &default_profile_project_id(project_root)) |
| 44 | .join(PROJECT_SESSION_DB_FILENAME) |
| 45 | }, |
| 46 | |layout| layout.sessions_db_path, |
| 47 | ) |
| 48 | } |
| 49 | |
| 50 | pub async fn open_project_session_db(project_root: &Path) -> Option<GlobalDb> { |
| 51 | let db_path = resolved_project_session_db_path(project_root).await?; |
no test coverage detected