gibaBR / Switch-Backup-Manager

Complete Switch Backups management tool
373 stars 54 forks source link

Select "outdated updates" is not working #111

Closed gibaBR closed 5 years ago

gibaBR commented 5 years ago

When I execute "Select outdated updates" from the menu, it selects nothing. There are erros on log:

2018-12-23 09:25:34.547 [ERROR] Error on 01000320000CC800, 2018-12-23 09:25:34.585 [ERROR] Error on 01004D1007926800, 2018-12-23 09:25:34.609 [ERROR] Error on 0100A840047C2800, 2018-12-23 09:25:34.639 [ERROR] Error on 01005CA0099AA800, 2018-12-23 09:25:34.663 [ERROR] Error on 0100D1000B18C800, 2018-12-23 09:25:34.687 [ERROR] Error on 0100749009844800, 2018-12-23 09:25:34.708 [ERROR] Error on 01006DA00707C800, 2018-12-23 09:25:34.731 [ERROR] Error on 0100969005E98800, 2018-12-23 09:25:34.761 [ERROR] Error on 0100ECF008474800, 2018-12-23 09:25:34.795 [ERROR] Error on 010006A0042F0800,

garoxas commented 5 years ago

it's because for some reason some games have empty version number and it throws an exception when you try to Convert.ToInt32(file.Version) you might want to try using int version; int.TryParse(file.Version, out version) instead

and by the way, when you move a file to updates_to_delete on this line

if (index <= updates.Count - 2)
{
    updates_to_delete.Add(new Tuple<string, int>(file.TitleID, Version), "");
}

shouldn't you use file.Latest instead to see if its version is less than the actual latest version?

edit on second thought, I noticed that you actually want to select older updates not outdated updates. so all is good then

gibaBR commented 5 years ago

Solved on 1.2.1

gibaBR commented 5 years ago

Thank You Garoxas! I have found where the problem was. It was on Util.GetFileDataNSP().