Closed
Description
There is a bug in SPIFFS.
This simple tweak to SPIFFS:
EDIT: PR here #1819
DirImplPtr SPIFFSImpl::openDir(const char* path) {
if (strlen(path) > 0) {
if (!isSpiffsFilenameValid(path)) {
DEBUGV("SPIFFSImpl::openDir: invalid path=`%s` \r\n", path);
return DirImplPtr();
}
}
.. means that we can do this:
POVDir = SPIFFS.openDir("");
.. and get the 'root' - i.e. all filenames in the SPIFFS
Note: without this code, there is no way to get files you put into SPIFFS that are not named with the prefix '/', for example .. which is not enforced anywhere else in SPIFFS, so you can in fact put files on SPIFFS that you can't retrieve, at the moment ..
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.