Skip to content

Steam downloads: a redistributable's file no longer replaces the game's own copy - #576

Merged
intraducine merged 1 commit into
willfaust:mainfrom
NevesHenry:steam-depot-overlap-per-folder
Nov 6, 2026
Merged

intraducine merged 1 commit into
willfaust:mainfrom
NevesHenry:steam-depot-overlap-per-folder

Conversation

@NevesHenry

Copy link
Copy Markdown
Contributor

In short

The later-depot-wins rule from 8f93433 compares file names only, across install folders. Since ddc6c2a the same plan also holds the Steamworks Common Redistributables depots, which go to their owner's folder (Steamworks Shared) and are planned after the game's own depots. A game file with the same relative name as a redistributable file (for example _CommonRedist\vcredist\2019\VC_redist.x64.exe) was then never written to the game's folder, and a repair never checked it.

Details

  • The overlap key is now the install folder plus the name. Depots that share the game's folder (DLC, language, update) behave as before.
  • tests/host/check-depot-overlap.py has not compiled since it came in with 8f93433: it builds DepotPlan and calls prepare() in the shape from before ddc6c2a. It now builds against the current code and has a two-folder case (game + Steamworks Shared).

No kill switch: this only changes which depot writes a file when two folders list the same name, and 8f93433 had none either.

Validation

Linux, Swift 6.4.1:

  • check-depot-overlap.py passes.
  • With main's DepotDownloader.swift and the new check: FAIL: the game's own copy is not written to its folder and FAIL: pending chunks across two folders: [[1],[0]]; the same-folder cases still pass.
  • Main's own check does not compile (missing argument for parameter 'installURL').

No device test and no real download: I don't know a game whose depot and a redistributable depot list the same path, so the impact is from reading the code.

AI disclosure: this change and description were written with Claude Code.

🤖 Generated with Claude Code

…'s own copy

8f93433 makes the last depot that lists a file the only one that writes
it, as Valve's client does. It compares file names only. Since ddc6c2a,
the same prepare() also plans the Steamworks Common Redistributables
depots a game names, into their owner's folder (steamapps/common/
Steamworks Shared). They are planned after the game's own depots.

So when a game's depot and a redistributable depot list the same
relative name (for example _CommonRedist\vcredist\2019\VC_redist.x64.exe),
the two files in two folders were treated as one. The game's copy got an
empty path: it was never downloaded into the game's folder, and a repair
never checked it. The log counted it as an overlap.

The rule now compares names within one install folder. Depots that
share the game's folder (DLC, language and update depots) behave as
before.

check-depot-overlap.py has not compiled since it came in with 8f93433:
it builds a DepotPlan without installURL and passes installURL to
prepare(), the shape from before ddc6c2a. It now builds against the
current code. It also has a two-folder case: the game and the
redistributable each keep their copy, in their own folder. With main's
DepotDownloader.swift that case fails ("the game's own copy is not
written to its folder"), while the same-folder cases still pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: NevesHenry <henriquereisneves@hotmail.com>

@intraducine intraducine left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the changed code and both prepare() callers. The host check passes at 7635994 and fails against current main for the two-folder case. Same-folder depot replacement still passes. All 13 CI checks completed successfully or were skipped as expected, including the full app build. This is a distinct download fix, so it does not need consolidation. No real Steam download or device run was performed in this review.

@intraducine
intraducine merged commit 8b52c18 into willfaust:main Nov 6, 2026
13 checks passed
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.

2 participants