projects : am projects (agregats par depot depuis le journal) + profils de projet dans la config (issue #29) - agent dominant, sessions, durees, cache projects.json rafraichi par doctor --fix
This commit is contained in:
@@ -248,6 +248,13 @@ pub fn fix(app: &App) -> Result<Vec<String>> {
|
||||
repaired.push(format!("created {}", app.paths.install_dir.display()));
|
||||
repaired.push(format!("created {}", app.paths.log_dir.display()));
|
||||
|
||||
// Project cache: always refreshed (it derives from the journal).
|
||||
let cache = crate::projects::cache_file(app);
|
||||
if cache.exists() {
|
||||
std::fs::remove_file(&cache).ok();
|
||||
repaired.push(format!("project cache {} removed (rebuilt on next 'am projects')", cache.display()));
|
||||
}
|
||||
|
||||
// Corrupt state file: back it up and start fresh.
|
||||
if app.state.path().exists() && app.state.load().is_err() {
|
||||
let backup = app
|
||||
|
||||
Reference in New Issue
Block a user