Skip to content

fix(install): Fix aria2's resume download feature#3292

Merged
niheaven merged 5 commits intoScoopInstaller:developfrom
Retia-Adolf:patch-1
Nov 14, 2021
Merged

fix(install): Fix aria2's resume download feature#3292
niheaven merged 5 commits intoScoopInstaller:developfrom
Retia-Adolf:patch-1

Conversation

@Retia-Adolf
Copy link
Copy Markdown
Contributor

  1. $has_downloads, I can't get what this means, probably "has to download"? so I used another var $download_finished instead.

  2. When

    test-path cache\filename.ext 		-> true,
    test-path cache\filename.ext.aria2	-> true,
    test-path cache\app.txt 			-> true,
    

    it indicates download had started but not finished, since otherwise app.txt, filename.ext.aria2 should be removed each by function dl_with_cache_aria2, aria2 process.

    So only when

    test-path cache\filename.ext		 -> true,
    test-path cache\filename.ext.aria2	 -> false,
    test-path cache\app.txt				 -> false,
    

    indicates $download_finished = $true, it does not need to download again, this time should it load cached file.

@Ash258 Ash258 mentioned this pull request Aug 21, 2020
21 tasks
@niheaven niheaven changed the base branch from master to develop November 13, 2021 16:55
@niheaven niheaven changed the title lib\install.ps1: fix problem that dl_with_cache_aria2 always does not use downloaded part in cache fix(install): Fix aria2's resume download feature Nov 14, 2021
@niheaven niheaven merged commit baa20ae into ScoopInstaller:develop Nov 14, 2021
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