mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-13 10:46:31 +02:00
Better cleanup on mount failures, as the idf api now seems to assign handle and mountpoint before failing. Fixes #3265 (#3282)
This commit is contained in:
@ -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);
|
esp_err_t err = esp_vfs_fat_spiflash_mount(basePath, partitionLabel, &conf, &_wl_handle);
|
||||||
if(err){
|
if(err){
|
||||||
log_e("Mounting FFat partition failed! Error: %d", 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;
|
return false;
|
||||||
}
|
}
|
||||||
_impl->mountpoint(basePath);
|
_impl->mountpoint(basePath);
|
||||||
|
Reference in New Issue
Block a user