beyond-all-reason / pr-downloader

console downloader for spring maps/games written in c++
GNU General Public License v2.0
0 stars 8 forks source link

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

Closed Jazcash closed 2 years ago

Jazcash commented 2 years ago

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"
]
p2004a commented 2 years ago

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.

p2004a commented 2 years ago

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.