fix PortduinoFS integration for Firmware.

This commit is contained in:
Thomas Göttgens 2022-03-16 08:30:38 +01:00
parent e435453363
commit cb6846ebc6
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}

View File

@ -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);
}