mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-23 19:21:59 +03:00
Fix SPIFFS.openDir("") (#2143)
* Update spiffs_api.cpp Fixes a bug where un-prefixed files are irretrievable with openDir(""). Described: https://github.com/esp8266/Arduino/issues/1818. * Update FS test cases
This commit is contained in:
@ -63,9 +63,9 @@ bool SPIFFSImpl::exists(const char* path)
|
||||
return rc == SPIFFS_OK;
|
||||
}
|
||||
|
||||
DirImplPtr SPIFFSImpl::openDir(const char* path)
|
||||
DirImplPtr SPIFFSImpl::openDir(const char* path)
|
||||
{
|
||||
if (!isSpiffsFilenameValid(path)) {
|
||||
if (strlen(path) > 0 && !isSpiffsFilenameValid(path)) {
|
||||
DEBUGV("SPIFFSImpl::openDir: invalid path=`%s` \r\n", path);
|
||||
return DirImplPtr();
|
||||
}
|
||||
|
Reference in New Issue
Block a user