[BUG:ESP32:LittleFS] Cannot rotate chart data #40
Labels
No labels
bug
documentation
duplicate
enhancement
help wanted
invalid
question
v0.1.x
v0.2.x
v0.3.x
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#35 [Grow:Dashboard] Sensor Data logging to LittleFS
DeltaLima/CanGrow
Reference
DeltaLima/CanGrow#40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When rotating on ESP32, deleting old files failes with error message, that the FD (file descriptor) is still open.
Maybe this is helpful: https://www.b4x.com/android/forum/threads/problem-deleting-files-with-littlefs.143882/
from the linked forum post i think a way to workaround this issue is to store all filenames for deletion into an array.
The array can be an
unsigned longbecause I already convert the filename to it to compare it as number.Maybe I have to iterate over all files twice. Onetime to count the total number of files, then initialize the array with the size of counted files in total, then iterate a second time, compare the filenames if they are ready for deletion. If so, store the filname as
unsigned longlinto the array. delete only, whenfilename > 0solved