Skip to main content

verify_snapshot

Function verify_snapshot 

Source
pub fn verify_snapshot(snapshot: &Path) -> Result<VerifyReport, GitClosureError>
Expand description

Verifies the structural and content integrity of a snapshot file.

Checks performed:

  1. snapshot-hash header matches recomputed hash over file metadata.
  2. Each regular file’s :sha256 matches SHA-256(content).
  3. Each regular file’s :size matches content.len().
  4. Each path is safe (no .., no absolute paths).
  5. Each mode string is valid octal.