beyond-all-reason/pr-downloader

`Error occurred while downloading: 2` when asking to redownload by `springname`

Jazcash opened this issue · 2 comments

image

Launched with args:

[
    "C:\\Users\\jaspe\\AppData\\Local\\Beyond All Reason\\Data\\engine\\105.1.1-1158-g27934d7 BAR105\\pr-downloader.exe",
    "--filesystem-writepath",
    "C:\\Users\\jaspe\\AppData\\Local\\Beyond All Reason\\Data",
    "--download-game",
    "Beyond All Reason test-20722-ee934c8"
]

Tested and I can reproduce it.

There are 2 issues:

  1. pr-downloader here does a resolution from game, to tag, and then downloads tags, visible from log:

    [Debug] /home/p2004a/Workspace/BAR/spring/tools/pr-downloader/src/Downloader/Download.cpp:34:addMirror():byar:test
    [Debug] /home/p2004a/Workspace/BAR/spring/tools/pr-downloader/src/Downloader/Download.cpp:34:addMirror():byar:git:ee934c8b60943f321d5874ebe23d883e4f
    

    So it attempts to download game twice, because the game is referenced by 2 tags (entirely normal)

  2. It reports error on condition when game is already downloaded. Probably because dl->state != IDownload::STATE_FINISHED fails, because one of the downloader didn't properly set the finished status in this corner case.

This error happens only when downloading by the springname and not by the rapid tag. When downloading by rapid tag, it doesn't error out when stuff is downloaded.