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

Optimize pr-downloader to not re-download map if it's present. #51

Open p2004a opened 1 year ago

p2004a commented 1 year ago

This is a regression from some refactoring a bunch of time ago, and is a safe behavior to just redownload, but it can be optimized to not have to do it.

The implementation would be computing of map file hash on disk, and comparing with the one available in hosting.

Comparing just file presence is not enough, as client could ask to redownload because there is some corruption and existing file on disk is not recognized correctly as valid map.