Skip to content

Add missing "LittleFS.begin()" in LittleFS_Timestamp example. #6762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 14, 2019
Merged

Add missing "LittleFS.begin()" in LittleFS_Timestamp example. #6762

merged 3 commits into from
Nov 14, 2019

Conversation

mbm60
Copy link
Contributor

@mbm60 mbm60 commented Nov 12, 2019

Add missing first LittleFS.begin() call.

Add missing first LittleFS.begin() call.
@mbm60 mbm60 changed the title Add missing "LittleFS.begin()" Add missing "LittleFS.begin()" in LittleFS_Timestamp example. Nov 12, 2019
Copy link
Collaborator

@devyte devyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right to me.

  1. My understanding is that the FS must be unmounted before formatting. This forces mounting before formatting. I think LittleFS.end() would need to be called before LittleFS.format()
  2. If the FS is not created, e.g.: wipe the entire flash, download the sketch, and then boot, then formatting is supposed to create it. In that case, this change will try to mount the FS, fail, and quit, disallowing formatting.
  3. I think an attempt should be done to mount. If it fails, it should be formatted. Then, the dir and file operations should be done.

@devyte devyte merged commit 95c7407 into esp8266:master Nov 14, 2019
@devyte devyte added this to the 2.7.0 milestone Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants