From 5ab48538b654a307c9cf991ac15516d0002fafe8 Mon Sep 17 00:00:00 2001 From: Ton Huisman Date: Fri, 25 Aug 2023 11:43:42 +0200 Subject: [PATCH] [SD-browser] Code improvements --- src/src/WebServer/FileList.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/src/WebServer/FileList.cpp b/src/src/WebServer/FileList.cpp index 13bbb8a059..30b951d68e 100644 --- a/src/src/WebServer/FileList.cpp +++ b/src/src/WebServer/FileList.cpp @@ -413,12 +413,9 @@ void handle_SDfilelist() { // size_t entrynameLength = strlen(entry.name()); if (entry.isDirectory()) { - char SDcardChildDir[80]; - // take a look in the directory for entries String child_dir = current_dir + entry.name(); - child_dir.toCharArray(SDcardChildDir, child_dir.length() + 1); - fs::File child = SD.open(SDcardChildDir); + fs::File child = SD.open(child_dir.c_str()); fs::File dir_has_entry = child.openNextFile(); // when the directory is empty, display the button to delete them