Returns the path to the global database: `global.db` inside the user-level data dir (`~/.tracedecay/` by default).
()
| 319 | /// Returns the path to the global database: `global.db` inside the user-level |
| 320 | /// data dir (`~/.tracedecay/` by default). |
| 321 | pub fn global_db_path() -> Option<PathBuf> { |
| 322 | if let Some(path) = global_db_path_override() { |
| 323 | return Some(path); |
| 324 | } |
| 325 | crate::config::user_data_dir().map(|dir| dir.join("global.db")) |
| 326 | } |
| 327 | |
| 328 | /// True when `TRACEDECAY_GLOBAL_DB` pins the global DB to an explicit path. |
| 329 | /// Consumers treat the override as an operator decision that wins over project |