From eae7c3a1594598ec161441db0defb1b6748575d2 Mon Sep 17 00:00:00 2001 From: Mimoja Date: Sat, 17 Jun 2023 00:56:23 +0200 Subject: [PATCH] ESP: Delete files after transfer where requested Beyond around 20 APs the littleFs will no longer provide enough space to add .pending files. The original .raw files are premarily held to be able to send them to the web interface. In those rare cases where this is not strictly needed we can allow specific setups to auto-delete them. Signed-off-by: Mimoja --- ESP32_AP-Flasher/src/newproto.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ESP32_AP-Flasher/src/newproto.cpp b/ESP32_AP-Flasher/src/newproto.cpp index 0a092c3c..09d9be7f 100644 --- a/ESP32_AP-Flasher/src/newproto.cpp +++ b/ESP32_AP-Flasher/src/newproto.cpp @@ -384,7 +384,11 @@ void processXferComplete(struct espXferComplete* xfc, bool local) { LittleFS.remove(dst_path); } if (LittleFS.exists(src_path)) { + #ifndef REMOVE_RAW LittleFS.rename(src_path, dst_path); + #else + LittleFS.remove(src_path); + #endif } time_t now;