diff --git a/src/FSCommon.cpp b/src/FSCommon.cpp index 81ff48f2c..3a2f8a92e 100644 --- a/src/FSCommon.cpp +++ b/src/FSCommon.cpp @@ -14,7 +14,7 @@ void listDir(const char * dirname, uint8_t levels) File file = root.openNextFile(); while(file){ - if(file.isDirectory()){ + if(file.isDirectory() && !String(file.name()).endsWith(".")) { if(levels){ listDir(file.name(), levels -1); } diff --git a/src/mesh/http/ContentHandler.cpp b/src/mesh/http/ContentHandler.cpp index a186e918e..cd0bcfe90 100644 --- a/src/mesh/http/ContentHandler.cpp +++ b/src/mesh/http/ContentHandler.cpp @@ -286,7 +286,7 @@ void htmlDeleteDir(const char * dirname) File file = root.openNextFile(); while(file){ - if(file.isDirectory()){ + if(file.isDirectory() && !String(file.name()).endsWith(".")) { htmlDeleteDir(file.name()); file.close(); } else { @@ -301,7 +301,7 @@ void htmlDeleteDir(const char * dirname) root.close(); } -void htmlListDir( HTTPResponse *res, const char * dirname, uint8_t levels) +void htmlListDir(HTTPResponse *res, const char * dirname, uint8_t levels) { File root = FSCom.open(dirname); if(!root){ @@ -313,7 +313,7 @@ void htmlListDir( HTTPResponse *res, const char * dirname, uint8_t levels) File file = root.openNextFile(); while(file){ - if(file.isDirectory()){ + if(file.isDirectory() && !String(file.name()).endsWith(".")) { if(levels){ htmlListDir(res, file.name(), levels -1); }