Skip to content

Commit 45d5d9b

Browse files
committed
Fix SD issue on failed mount
fixes: espressif#613
1 parent 14dd44a commit 45d5d9b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: libraries/SD/src/SD.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ bool SDFS::begin(uint8_t ssPin, SPIClass &spi, uint32_t frequency, const char *
3636
}
3737

3838
if(!sdcard_mount(_pdrv, mountpoint)){
39+
sdcard_unmount(_pdrv);
3940
sdcard_uninit(_pdrv);
4041
_pdrv = 0xFF;
4142
return false;

0 commit comments

Comments
 (0)