Skip to content

fix(snapshot): auto-create dir in save(), return empty list in list_snapshot_files()#8

Merged
geronimo-iia merged 6 commits into
mainfrom
fix/snapshot-dir-not-found
May 3, 2026
Merged

fix(snapshot): auto-create dir in save(), return empty list in list_snapshot_files()#8
geronimo-iia merged 6 commits into
mainfrom
fix/snapshot-dir-not-found

Conversation

@geronimo-iia
Copy link
Copy Markdown
Owner

@geronimo-iia geronimo-iia commented May 3, 2026

Summary

  • save() and save_any() now call create_dir_all before writing — no more Err(NotFound) on first launch when the snapshot directory doesn't exist.
  • list_snapshot_files() returns Ok(vec![]) instead of Err(NotFound) when the snapshot directory is absent.
  • Two regression tests added to tests/snapshot.rs.
  • Version bumped to 0.3.1. CHANGELOG updated.

Fixes #7.

Test plan

  • cargo test --features snapshot list_snapshot_files_missing_dir_returns_empty passes
  • cargo test --features snapshot save_creates_missing_directory passes
  • cargo test --features snapshot — full suite green (111 tests)
  • cargo build --features snapshot — clean compile

@geronimo-iia geronimo-iia self-assigned this May 3, 2026
@geronimo-iia geronimo-iia merged commit bdad482 into main May 3, 2026
2 checks passed
@geronimo-iia geronimo-iia deleted the fix/snapshot-dir-not-found branch May 3, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(snapshot): save() and list_snapshot_files() panic/fail when snapshot dir does not exist

1 participant