plugin.program.iagl icon indicating copy to clipboard operation
plugin.program.iagl copied to clipboard

Games with period in title are always re-downloaded

Open tonywagner opened this issue 4 years ago • 2 comments

I noticed that games with a period in the title and file name (like a certain series of "Bros." games :) ) were always re-downloading, even though they already existed in my download path.

Looks like the problem is this line, under the "get_game_download_dict" definition of utils.py:

'filename_no_ext':game_filename.split('.')[0],

Unfortunately that discards everything after the first period in the filename, rather than just the extension! So the "matching_existing_files" comparison would always fail on these files, even if they existed.

"os.path.splitext" is the more appropriate function to determine the file name without the extension. So this issue can be solved by changing the above line to the following:

'filename_no_ext':os.path.splitext(game_filename)[0],

tonywagner avatar Feb 04 '22 01:02 tonywagner

Thanks for this report and finding the isssue

zach-morris avatar Feb 04 '22 01:02 zach-morris

Fix with latest commit. Will be included in next release

zach-morris avatar Feb 06 '22 17:02 zach-morris