Skip to content

Commit

Permalink
Better cleanup on mount failures, as the idf api now seems to assign …
Browse files Browse the repository at this point in the history
…handle and mountpoint before failing. Fixes #3265 (#3282)
  • Loading branch information
lbernstone authored and me-no-dev committed Sep 26, 2019
1 parent a5c873b commit f8c0689
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/FFat/src/FFat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ bool F_Fat::begin(bool formatOnFail, const char * basePath, uint8_t maxOpenFiles
esp_err_t err = esp_vfs_fat_spiflash_mount(basePath, partitionLabel, &conf, &_wl_handle);
if(err){
log_e("Mounting FFat partition failed! Error: %d", err);
esp_vfs_fat_spiflash_unmount(basePath, _wl_handle);
_wl_handle = WL_INVALID_HANDLE;
return false;
}
_impl->mountpoint(basePath);
Expand Down

0 comments on commit f8c0689

Please sign in to comment.