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 <git@mimoja.de>
This commit is contained in:
Mimoja
2023-06-17 00:56:23 +02:00
committed by Mimoja
parent 4d78df09cc
commit eae7c3a159

View File

@@ -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;