From 1a06f88dfb44ecc5bb45fe18d3ce8603c276a0fe Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 17 Nov 2024 07:57:59 -0600 Subject: [PATCH] Cleanup static files from bad Web UI bundle on 2.5.13 release (#5376) * Cleanup static files from bad Web UI bundle on 2.5.13 release * Check existence first * Esp32 is the only one we care about --- src/mesh/NodeDB.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 7f051ae167..102ac1f614 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -823,6 +823,11 @@ void NodeDB::loadFromDisk() 0; // Mark the current device state as completely unusable, so that if we fail reading the entire file from // disk we will still factoryReset to restore things. +#ifdef ARCH_ESP32 + if (FSCom.exists("/static/static")) + rmDir("/static/static"); // Remove bad static web files bundle from initial 2.5.13 release +#endif + // static DeviceState scratch; We no longer read into a tempbuf because this structure is 15KB of valuable RAM auto state = loadProto(prefFileName, sizeof(meshtastic_DeviceState) + MAX_NUM_NODES_FS * sizeof(meshtastic_NodeInfo), sizeof(meshtastic_DeviceState), &meshtastic_DeviceState_msg, &devicestate);