I'm trying to get the file explorer feature to work on the flow3r badge (ESP32-S3 / MicroPython with a bunch of customizations) and ran into the following issue:
FilesManager.decodeFiles() is assuming that all elements returned by os.ilistdir() have four tuple members. But according to the MicroPython docs, the last element (size) is optional.
From what I can see, the size value in MicroFile is not used anyway, so it should be safe to fall back to 0/-1.
I've created a a potential fix. Let me know what you think about the approach.
Hello @antweb
I'm sorry, I'm too late to see that issue. But thanks to your suggestion it should be fixed now ✅
I hope you made a pull request since then it would have helped a lot.
Thanks
Hi!
I'm trying to get the file explorer feature to work on the flow3r badge (ESP32-S3 / MicroPython with a bunch of customizations) and ran into the following issue:
FilesManager.decodeFiles()
is assuming that all elements returned byos.ilistdir()
have four tuple members. But according to the MicroPython docs, the last element (size) is optional.From what I can see, the
size
value inMicroFile
is not used anyway, so it should be safe to fall back to0
/-1
. I've created a a potential fix. Let me know what you think about the approach.