MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / resolve_layout_for_current_profile

Function resolve_layout_for_current_profile

src/storage.rs:264–283  ·  view source on GitHub ↗
(project_root: &Path)

Source from the content-addressed store, hash-verified

262}
263
264pub fn resolve_layout_for_current_profile(project_root: &Path) -> Result<StoreLayout> {
265 match read_enrollment_marker(project_root)? {
266 Some(marker) if marker.storage_mode == StorageMode::ProfileSharded => {
267 let profile_root = default_profile_root()?;
268 profile_sharded_layout(project_root, &profile_root, &marker)
269 }
270 Some(marker) => Err(TraceDecayError::Config {
271 message: format!(
272 "unsupported storage_mode={:?} in enrollment marker for '{}'; \
273 run TraceDecay migration to move this project into the user profile store",
274 marker.storage_mode,
275 project_root.display()
276 ),
277 }),
278 None => {
279 let profile_root = default_profile_root()?;
280 default_profile_sharded_layout(project_root, &profile_root)
281 }
282 }
283}
284
285pub fn resolve_project_session_db_path(project_root: &Path) -> Result<PathBuf> {
286 Ok(resolve_layout_for_current_profile(project_root)?.sessions_db_path)

Callers 15

get_config_pathFunction · 0.85
discover_project_rootFunction · 0.85
hook_import_sourcesFunction · 0.85
classify_project_storageFunction · 0.85
classify_project_storageFunction · 0.85
resolve_lcm_payload_rootFunction · 0.85
project_session_db_pathFunction · 0.85

Calls 4

read_enrollment_markerFunction · 0.85
default_profile_rootFunction · 0.85
profile_sharded_layoutFunction · 0.85