You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue to discuss the opportunity to change the default behaviour of SPIFFS mount() and begin().
In the current implementation, if the mounting filesystem fails, the API silently formats the filesystem and mounts it - empty.
Pro: after mount, the programmer is guaranteed to have a mounted filesystem
Con: if the chip is defective, or the API has a bug, or the FS has been formated with incompatible configuration, data gets lost without a warning. This is also contrary to the default behaviour chosen for ESP32
I would suggest to adopt the same convention as the ESP32: SPIFFS.begin() should accept an optional "formatOnFail" parameter, defaulting to false.
This would be breaking change (albeit in the direction of safety), so I guess it would have to be targeted to the next major version,
This issue to discuss the opportunity to change the default behaviour of SPIFFS mount() and begin().
In the current implementation, if the mounting filesystem fails, the API silently formats the filesystem and mounts it - empty.
Pro: after mount, the programmer is guaranteed to have a mounted filesystem
Con: if the chip is defective, or the API has a bug, or the FS has been formated with incompatible configuration, data gets lost without a warning. This is also contrary to the default behaviour chosen for ESP32
I would suggest to adopt the same convention as the ESP32: SPIFFS.begin() should accept an optional "formatOnFail" parameter, defaulting to false.
This would be breaking change (albeit in the direction of safety), so I guess it would have to be targeted to the next major version,
References:
#2581 (comment)
#4111 (comment)
espressif/arduino-esp32#411 (comment)
The text was updated successfully, but these errors were encountered: