Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to try downloading but use the cached file if that fails #2288

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexhenrie
Copy link
Contributor

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.

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.
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