From 572c9be0f23f24b70b3e0c7fac99e45562170035 Mon Sep 17 00:00:00 2001 From: unlogisch04 <98281608+unlogisch04@users.noreply.github.com> Date: Sat, 4 May 2024 19:04:08 +0200 Subject: [PATCH] fshelper: fixed ESP8266 regression caused by abstracting FS access #321 (#328) * fshelper: fixed ESP8266 regression caused by abstracting FS access #321 * Removing not needed ifdef l0ud spotted that this is not need. Co-Authored-By: Przemyslaw Romaniak --------- Co-authored-by: Przemyslaw Romaniak --- src/FSHelper.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/FSHelper.cpp b/src/FSHelper.cpp index 3bdf005b0..c30932df4 100644 --- a/src/FSHelper.cpp +++ b/src/FSHelper.cpp @@ -37,14 +37,9 @@ bool ensureDirectory(const char* directory) { } } -#ifdef ESP32 - auto dir = LittleFS.open(directory); + auto dir = LittleFS.open(directory, "r"); auto isDirectory = dir.isDirectory(); dir.close(); -#else - auto dir = LittleFS.openDir(directory); - auto isDirectory = dir.isDirectory(); -#endif if (!isDirectory) { if (!LittleFS.remove(directory)) {