Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix: retain quarantine markers when a fragment has no recoverable prefix

Richie McIlroy3948902be62f
diff --git a/crates/recording/src/recovery.rs b/crates/recording/src/recovery.rs
index 6654bfe9a..281513fc4 100644
--- a/crates/recording/src/recovery.rs
+++ b/crates/recording/src/recovery.rs
@@ -812,6 +812,12 @@ impl RecoveryManager {
);
}
Err(error) => {
+ let reason = if error.kind() == std::io::ErrorKind::InvalidData {
+ "truncated_fragment".to_string()
+ } else {
+ error.to_string()
+ };
+ let _ = std::fs::write(&corrupt_marker, &reason);
warn!(path = %path.display(), %error, "Cannot recover fragment prefix");
if let Some(health_tx) = health_tx {
emit_health(