Skip to main content

Module preflight

Module preflight 

Source

Structsยง

HostFacts
What the caller measures through Win32, so this module stays testable off Windows.
Preflight
What execute reuses, so no archive is opened twice.

Enumsยง

PreflightError

Functionsยง

check_space ๐Ÿ”’
Room for what is written plus copies of what it replaces, doubled as if every file replaced one its size, which errs on the safe side.
check_writable
Whether this account can write to game_dir, asked when the user settles on it and before anything is installed, so it removes whatever the probe created: a folder the user then abandons keeps no trace.
preflight
Everything that can fail is checked before the first file is touched, since a failure after an uninstall leaves neither the old content nor the new.
probe_writable ๐Ÿ”’
Creates the state directory and a probe file in it.
verified_files ๐Ÿ”’
The files of the payload named by sha256, checked against it; by digest rather than through the index, which holds only the newest version, so a restore can name an older one.