TheOfficialFloW / VitaShell

Multi-functional file manager for PS Vita
GNU General Public License v3.0
1.37k stars 225 forks source link

Fix crashes on "Refresh Liveara" w PSM #560

Closed LiEnby closed 4 years ago

LiEnby commented 4 years ago

The issue appears to be that when a folder existed in ux0:/psm that did not contain RW/System/content_id file the program would crash

this is oddly due to this check

          int contentid_size = allocateReadFile(contentid_path, &cidFile);
      if(contentid_size < 0)
        return contentid_size;

apparently a <0 return from this function will still count as a "please promote this" so in order to fix i made it just return 0 as well as added a size check to make sure its not just some random file been thrown in there

it turns out some apps acturally write there own files to ux0:/psm in order to show a "interlectural property notices" screen w psm_manual: app which is likely how this error was triggered to begin with.

this should fix #559 (hopefully)

TheOfficialFloW commented 4 years ago

Please fix indentation and coding style such that it matches VitaShell's. Then I'm happy to merge.

LiEnby commented 4 years ago

is this better?