meanmedianmoge/zoia_lib

[Ubuntu OS] logic failure in ZOIALibrarian_main.py line 1203

Closed this issue · 3 comments

Describe the bug
the program running in the background when I noticed a terminal error at this path: /zoia_lib/zoia_lib/UI/ZOIALibrarian_main.py in line 1203. Looks like the function import_multiple_menu(), when attempting to look at the patch name and remove the ".bin" from the end of the file name, the logic fails due to the index being out of range

To Reproduce
Terminal error presented while application was running in background.

Expected behavior
No noticeable UI bugs, but terminal is presenting error. Not sure which workflow this effects.

Desktop (please complete the following information):

  • OS: [Ubuntu OS]
  • Version 20.04 LTS

Proposed Fix
Since you hard-coded an index of 1, maybe consider adding a check to see if there is a patch there at all before running this logic? I didn't dig far enough into the use of this function since I don't know what controller (if any) is calling it.

this is not a high priority bug, I am unsure of how to change the priorities of the labels.

@AvantGov Thanks for catching this. Do you happen to have any patches you're trying to import with either "." in the patch name or multiple file endings (perhaps .bin.zip)? Switching to [-1] should cover basic usage, so I'm just curious about potential edge-cases.

I didn't have my SD card in the computer at any time while I had the application open, but looking back through the patches on my device I did see a fair amount of other patches making use of '.' in the name ("DSTR.TRNSPRT V2" and "Volante.1.0", etc.) which I downloaded from PatchStorage.