SlimeVR / SlimeVR-Tracker-ESP

SlimeVR tracker firmware for ESP32/ESP8266 and different IMUs
Apache License 2.0
798 stars 274 forks source link

fshelper: fixed ESP8266 regression caused by abstracting FS access #321

Closed l0ud closed 2 months ago

l0ud commented 3 months ago

This is hotfixing ESP8266 calibration storage which seems to be broken since #319

isDirectory method on Dir object doesn't tell about the Dir object itself, but about the entry pointed by internal pointer (which you can move using next() to iterate). As next() is never called, isDirectory will always return false (in fact, isFile too). Considering heavy simplifications in Esp8266 filesystem regarding directories and the fact that previous ESP8266 implementation didn't try to do any file/directory fixing, I made it ESP32 only.

TheDevMinerTV commented 3 months ago

Thank you for catching this bug. I think that just leaving this check out from the ESP8266 code is the wrong move, as I wanted to implement that specific check for it as well. We should probably fix it "the right way".

unlogisch04 commented 2 months ago

As this one seems to be stuck, i did open one with a fix that i tested on esp8266: https://github.com/SlimeVR/SlimeVR-Tracker-ESP/pull/328

l0ud commented 2 months ago

Superseded by: https://github.com/SlimeVR/SlimeVR-Tracker-ESP/pull/328