feat(spiffs): Modified esp_spiffs_deinit
Changed position of formating check to be able to format the fs even if its not loaded.
Required if SPIFFS_MAGIC is used
Merges
@@ -157,12 +157,11 @@ void esp_spiffs_deinit(u8_t format)
free(spiffs_work_buf);
free(spiffs_fd_buf);
free(spiffs_cache_buf);
-
+ }
if (format) {
SPIFFS_format(&fs);
}
}
-}
int _spiffs_open_r(struct _reent *r, const char *filename, int flags, int mode)
{
