Skip to content

Commit

Permalink
fshelper: fixed ESP8266 regression caused by abstracting FS access S…
Browse files Browse the repository at this point in the history
…limeVR#321 (SlimeVR#328)

* fshelper: fixed ESP8266 regression caused by abstracting FS access SlimeVR#321

* Removing not needed ifdef

l0ud spotted that this is not need.

Co-Authored-By: Przemyslaw Romaniak <[email protected]>

---------

Co-authored-by: Przemyslaw Romaniak <[email protected]>
  • Loading branch information
2 people authored and Spacefish committed Jun 28, 2024
1 parent b70eb62 commit 572c9be
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 @@ -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)) {
Expand Down

0 comments on commit 572c9be

Please sign in to comment.