Save sharing: a zip's Saves and Storage import in any letters #584

Merged
kibagami-nc merged 1 commit from upstream-pr/584 into main 2026-11-29 08:16:59 +00:00
kibagami-nc commented 2026-11-28 01:19:02 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kibagami-nc on 2026-11-28T01:19:02Z.


The problem

place (crates/victory-gpu/src/save_share.rs) finds a save's parts in a zip whatever their case (p.eq_ignore_ascii_case(k)), but it kept the zip's own spelling in the path it gave back. unzip then checks for the import's saves part by its exact name: Path::starts_with compares components as they are written.

So a zip whose folder is Saves (or SAVES) was refused with "no save in that zip (no saves folder)". A player who renames or zips the folders by hand gets this, as does any zip tool that changes case.

The change

place gives the part as PARTS names it (saves, storage), followed by the rest of the entry's path. The import then lands in the folders as the game names them.

Tests

  • New save_share::tests::a_zip_with_its_parts_named_in_capitals_imports: a zip of my save/Saves/... and my save/STORAGE/....
    • The check. It stages, it is applied, both parts' files are in place, and the folders are named saves and storage.
    • Before / after. It fails before the change with NotFound: "no save in that zip (no saves folder)", and passes after it.
  • The other five save_share tests pass.
  • cargo test -p victory-gpu --locked --lib: 442 passed. The 2 failures were the indirect tests that then failed on main too; main has fixed them since (9b712a6).
  • cargo clippy -p victory-gpu --all-targets -- -D warnings: nothing in save_share.rs. It still stops on the dead-code lints main has.

No game files, dumps or extracted data are included.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5535299200 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/584). Originally posted by [kibagami-nc](https://github.com/kibagami-nc) on 2026-11-28T01:19:02Z. --- ## The problem `place` (`crates/victory-gpu/src/save_share.rs`) finds a save's parts in a zip whatever their case (`p.eq_ignore_ascii_case(k)`), but it kept the zip's own spelling in the path it gave back. `unzip` then checks for the import's `saves` part by its exact name: `Path::starts_with` compares components as they are written. So a zip whose folder is `Saves` (or `SAVES`) was refused with "no save in that zip (no saves folder)". A player who renames or zips the folders by hand gets this, as does any zip tool that changes case. ## The change `place` gives the part as `PARTS` names it (`saves`, `storage`), followed by the rest of the entry's path. The import then lands in the folders as the game names them. ## Tests - New `save_share::tests::a_zip_with_its_parts_named_in_capitals_imports`: a zip of `my save/Saves/...` and `my save/STORAGE/...`. - **The check.** It stages, it is applied, both parts' files are in place, and the folders are named `saves` and `storage`. - **Before / after.** It fails before the change with `NotFound: "no save in that zip (no saves folder)"`, and passes after it. - The other five `save_share` tests pass. - `cargo test -p victory-gpu --locked --lib`: 442 passed. The 2 failures were the indirect tests that then failed on `main` too; `main` has fixed them since (9b712a6). - `cargo clippy -p victory-gpu --all-targets -- -D warnings`: nothing in `save_share.rs`. It still stops on the dead-code lints `main` has. No game files, dumps or extracted data are included.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!584
No description provided.