From 70ddba2cbcbfa36bc0c98091af9ae2850e69f169 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Wed, 29 Apr 2020 20:28:10 +0200 Subject: [PATCH] Log contents of SPIFFS on bootup. --- src/pitrix.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/pitrix.cpp b/src/pitrix.cpp index fd4e1e0..226899b 100644 --- a/src/pitrix.cpp +++ b/src/pitrix.cpp @@ -51,7 +51,16 @@ void setup() { #ifdef MQTT_ENABLE mqtt_setup(); #endif - SPIFFS.begin(); + if (!SPIFFS.begin()) { + LOGln("Core * Could not open SPIFFS filesystem"); + } else { + LOGln("Core * Files in SPIFFS filesystem:"); + Dir d = SPIFFS.openDir("/"); + while(d.next()) { + LOGln("Core * %s", d.fileName().c_str()); + } + LOGln("Core * End of SPIFFS file listing."); + } load_settings(); LOGln("Core * Setup complete"); }