This also appears to fix both the G12 and G5X.
That seems like a good approach to me. Fixes both opening text files and running modules from filebrowser for me on sx160
I only tried text files, but there's no more crash/blank screen here either.
Somewhat unrelated, one of my cams happened to have a file with a special size, shown incorrectly in the size column. Filesize in bytes also visible on the attached screenshot.