Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Minor: examples/Async_ESP32_FSWebServer/ wrongly uses FileFS.begin(true)  #47

@robcazzaro

Description

@robcazzaro

(please also see lorol/LITTLEFS#27 for more context)

I'm using your library and your examples as a starting point for my project. Thanks for sharing this!

I noticed that the following code

// Format SPIFFS if not yet
  if (!FileFS.begin(true))
  {
    Serial.print(FS_Name);
    Serial.println(F(" failed! AutoFormatting."));
  }

seems to assume that FileFS.begin(true) returns false if the SPIFFS was un-initialized and needed to be formatted. In reality that call returns true if the mount has been successful, even if that required an auto-format, false only when the mount fails for whatever reason.

If the debug output is enabled, the LittleFS library debug messages overwrite any debug print from the Arduino thread, causing additional comprehension problems

If the call FileFS.begin(true) fails, that means that there is no SPIFFS, and your example should abort

The above applies to all your examples using SPIFFS for ESP32

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions