Skip to content

Launcher: rollback can overwrite a player's changed file with the old payload #184

Closed

Description

@phantoslayer21

Rollback to the kept previous version (clean/installer/src/wg_core/launcher.cpp:616-645) saves the current bytes in a temporary previous-version tree, then copies the old payload over the live path without checking it against the install record.

If a player replaced a recorded payload file after the update, their file is held only as a rollback generation, not kept under the "no player file is ever deleted" rule. A later rollback or update cleanup can remove that generation, so the player's file is lost.

Expected: rollback writes over a live file only if it is recorded as ours and its bytes still match the record, checked and written through one handle. Anything else is kept in place and listed in the result. Needs tests for a payload file replaced after update, and for a swap between check and write.

Found in the review of #47. Highest priority of the three follow-ups to #47.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: launcherLauncher and installerbugSomething isn't working

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions