fix: bug in batt logging, sd didn't check if directory exists

which would mean the user had not yet enabled loggin to sd but only
mounted a card
This commit is contained in:
Enot (ded) Skelly
2026-07-08 09:40:02 -07:00
parent c322b1fa3a
commit 4846d4fa51
+2 -2
View File
@@ -14780,13 +14780,13 @@ static void calibrateBatteryCb(lv_event_t* e) {
// SPIFFS (flat) uses a top-level path.
static fs::FS& battLogFs() {
#if CAP_SD
if (SD.cardType() != CARD_NONE) return SD;
if (SD.cardType() != CARD_NONE && SD.exists("/meshcomod")) return SD;
#endif
return SPIFFS;
}
static bool battLogOnSd() {
#if CAP_SD
return SD.cardType() != CARD_NONE;
return SD.cardType() != CARD_NONE && SD.exists("/meshcomod");
#else
return false;
#endif