Commit Graph

2 Commits

Author SHA1 Message Date
Fabio Scotto di Santolo
c397728912 Unify error handling: output parameter, goto cleanup, errno preservation
- Replace global field variable with output parameter enum Fields *err
- Adopt single goto cleanup pattern across all functions
- Add errno preservation around cleanup in all modules
- Fix early return bug in create.c cleanup block
- Add ferror check in crc32() for silent read errors
- Document error contracts in all public headers
2026-08-26 14:20:00 +02:00
Fabio Scotto di Santolo
dcd17889ac Implement snapshot diff command
Add fsnap diff <old> <new> that compares two snapshots and reports
added (A), deleted (D), metadata changed (M), permissions changed (P),
and symlink target changed (L) records.

Both snapshots are loaded into memory, sorted by path using qsort,
and merged with a two-pointer algorithm. Residual records after the
merge are emitted as A or D. Escape sequences in paths are decoded
on output.

Also add GetTime accessor, set errno on load_in_memory failures
for meaningful error messages, and fix unused-variable warnings.
2026-08-25 18:13:29 +02:00