fix(profile): handle missing chain files without breaking rollback

This commit is contained in:
wonfen
2026-07-19 08:44:24 +08:00
parent 6e9288437f
commit 50d828d0d7
4 changed files with 51 additions and 16 deletions
+3 -1
View File
@@ -533,7 +533,9 @@ impl PrfItem {
.as_ref()
.ok_or_else(|| anyhow::anyhow!("could not find the file"))?;
let path = dirs::app_profiles_dir()?.join(file.as_str());
let content = fs::read_to_string(path).await.context("failed to read the file")?;
let content = fs::read_to_string(&path)
.await
.with_context(|| format!("failed to read the file \"{}\"", path.display()))?;
Ok(content.into())
}