Skip to content

fix: skip empty native save archives - #11

Open
dmuiX wants to merge 1 commit into
prodeveloper0:mainfrom
dmuiX:fix/skip-empty-save-archives
Open

dmuiX wants to merge 1 commit into
prodeveloper0:mainfrom
dmuiX:fix/skip-empty-save-archives

Conversation

@dmuiX

@dmuiX dmuiX commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Treat a mounted native save container with zero files as SAVEDATA_NO_SAVE_DATA and remove its staged archive instead of uploading it.

Why

A title can have a mountable Horizon save container before the game has written any files. ZipWriter still creates a technically valid 22-byte empty ZIP, and the previous code returned success because it only checked whether individual add() calls failed. With no files, no call fails.

That empty ZIP is non-zero-length, so transport-level empty-body checks cannot identify it. Once committed, it becomes the latest revision and restore validation must reject it.

Implementation

  • count successfully archived entries under saves/;
  • if the count is zero, close and remove the staged ZIP;
  • return the existing SAVEDATA_NO_SAVE_DATA result;
  • do not count BCAT entries because native restore requires actual save data;
  • increment the bundled sysmodule version so installed services receive the fix.

Validation

Both the app and sysmodule build successfully from a clean client build. The issue was reproduced on hardware with a never-played installed title: every generated archive was exactly 22 bytes with zero ZIP entries.

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.

1 participant