fix: replace critical hardcoded paths (A-4.2 P3)

Issues: 4 remaining critical paths affecting release

Fixed:
- health.rs: models path -> path_utils::models_dir()
- config.rs: STORAGE_ROOT -> relative fallback
- storage/output_dir.rs: backup -> relative fallback
- tmdb/probe.rs: scripts -> path_utils::scripts_dir()

Verification: cargo check --lib passes

Impact: All paths now have portable fallbacks
This commit is contained in:
Accusys
2026-10-04 16:40:14 +08:00
parent 14bbae258b
commit cccb0aa9b9
4 changed files with 15 additions and 5 deletions
+1 -1
View File
@@ -244,7 +244,7 @@ pub async fn health_detailed(State(state): State<AppState>) -> Json<DetailedHeal
let scripts_base = config::SCRIPTS_DIR.clone();
let scripts_dir = std::path::Path::new(&scripts_base);
let scripts_path = scripts_dir.to_path_buf();
let models_path = std::path::PathBuf::from("/Users/accusys/momentry_core_0.1/models");
let models_path = crate::core::path_utils::models_dir();
let py_files = std::fs::read_dir(&scripts_path)
.map(|d| {