Skip to content

Commit

Permalink
Add an option to try downloading but use the cached file if that fails
Browse files Browse the repository at this point in the history
By default, Winetricks fails when the cached version of a file is old
and the newer file can't be downloaded. The user can get around that
with the --force option, which uses whatever is in the cache whether or
not its checksum is correct, but that requires the user to run
`winetricks` a second time with --force and it also disables the check
for whether the winetrick is already installed. The --cached-acceptable
option provides a middle ground: If the checksum of the cached file does
not match, it tries to download the correct file (like the default
behavior), but if the download fails, it falls back to using the cached
file (like --force but without the other effects). That behavior is
ideal for when websites might be down but the user already has in their
cache sufficiently recent versions of the files they need.

--cached-acceptable may be used with or without --force: When combined
with --force it leaves --force's other effects in place and affects only
the download process.
  • Loading branch information
alexhenrie committed Oct 20, 2024
1 parent a06ea87 commit 9e6e657
Showing 1 changed file with 144 additions and 133 deletions.
Loading

0 comments on commit 9e6e657

Please sign in to comment.