From 45d5d9b3600faa0cb10caef3e2b8a9e8a9479f02 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Mon, 6 Nov 2017 16:13:09 +0200 Subject: [PATCH] Fix SD issue on failed mount fixes: https://github.com/espressif/arduino-esp32/issues/613 --- libraries/SD/src/SD.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/SD/src/SD.cpp b/libraries/SD/src/SD.cpp index be307f39..f92532ca 100644 --- a/libraries/SD/src/SD.cpp +++ b/libraries/SD/src/SD.cpp @@ -36,6 +36,7 @@ bool SDFS::begin(uint8_t ssPin, SPIClass &spi, uint32_t frequency, const char * } if(!sdcard_mount(_pdrv, mountpoint)){ + sdcard_unmount(_pdrv); sdcard_uninit(_pdrv); _pdrv = 0xFF; return false;