Remove main file if empty during hex creation by microbit-robert · Pull Request #1223 · microbit-foundation/python-editor-v3
Please can we double check that we don't read main.py from the fs directly anywhere else?
We read it using FileSystem read, but not using MicropythonFsHex read/readBytes. So this looks safe to me.
Hmm did just create an error reloading a hex file though. Moving back to draft to investigate.
Update: We can't load a hex file that doesn't have a main.py. The same is true of a blank hex you can create from the V2 editor. I think we should fix as we're adding the ability to create such hex files in this PR.