Skip to content

Commit

Permalink
[SD-browser] Code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
tonhuisman committed Aug 25, 2023
1 parent 2ef9bb9 commit 5ab4853
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/src/WebServer/FileList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5ab4853

Please sign in to comment.