loboris/ESP32_spiffs_example

root is not handled properly

joysfera opened this issue · 0 comments

please try out (and check the returned values) - all the calls should succeed, IMHO:

int res;
DIR *dir;
res = stat("/spiffs");
res = stat("/spiffs/");
dir = opendir("/spiffs");
dir = opendir("/spiffs/");

One problem is in esp-idf that does not pass the call to VFS if there is no ending slash.
Another problem is in your folder implementation that doesn't seem to handle root folder ("/" or "/.") well.