Skip to content

Commit

Permalink
fshelper: fixed ESP8266 regression caused by abstracting FS access
Browse files Browse the repository at this point in the history
  • Loading branch information
l0ud committed Mar 28, 2024
1 parent e09ca3c commit 46ad5bf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/FSHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ bool ensureDirectory(const char* directory) {
auto dir = LittleFS.open(directory);
auto isDirectory = dir.isDirectory();
dir.close();
#else
auto dir = LittleFS.openDir(directory);
auto isDirectory = dir.isDirectory();
#endif

if (!isDirectory) {
if (!LittleFS.remove(directory)) {
m_Logger.error("Failed to remove directory: %s", directory);
Expand All @@ -57,7 +52,7 @@ bool ensureDirectory(const char* directory) {
return false;
}
}

#endif
return true;
}

Expand Down

0 comments on commit 46ad5bf

Please sign in to comment.