Open rFlightFPV opened 1 week ago
Hi @rFlightFPV, I have checked the code and if size of the message is 0 -> no message, write returns 0. From my point of view the approach is fine, as you can't write "nothing". Maybe you can add a check in the sketch, to not try to write when there is nothing to write.
Board
LilyGo ESP32 T-SIM7080G
Device Description
No additional hardware
Hardware Configuration
No
Version
v3.0.6
IDE Name
Arduino IDE 2.3.3
Operating System
MacOS Sequoia 15.1
Flash frequency
240 MHz
PSRAM enabled
yes
Upload speed
460800
Description
Using LittleFS included in core and examples provided in this repository. I am using a webserver form where the user can populate a field or leave it empty. It works fine writing and reading files. LittleFS seems to be perfectly capable of writing empty files, the file is written and is listed when reading the directory (see below) with size:0. However when writing the file, the Serial printout is " -write failed" which is not true. I know it is minor issue as it's just an error in printout handling as far as I understand. Still it can be irritating while debugging.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide