Problem with Esp8266 and SPIFFs; file is removed

Hello Everyone,

I’m working with a Esp8266 and I’ve found a problem similar to this: Writing files with SPIFFS no longer working for ESP-01 · Issue #4061 · esp8266/Arduino · GitHub (if it’s not the same).

Basically when I want to write a File, it is deleted instead of updated.

Have you seen this problem?
Do you know if the file in Platformio is updated with the fix?


Does it work correct with Arduino IDE?

Hi @ivankravets ,

I haven’t tested it with Arduino IDE, however I’ve replaced the Esp.cpp shared in the thread into the platformio core (there are a couple of differences, but really I haven’t seem the differences carefully and what they do. I only update a function signature from uint_32 to uint_64 to compile successfully).

Anyway after to replace the file, the result is the same, I can’t not write the file.

I’ve noticed (changing the Esp.cpp file or not) that If the file that I want to write exists, it’s removed when I try to write it and if I try to save it more than one time, the others files seem to be corrupted and then the ESP stop working properly and I have to upload again all the “data” files and the code… it’s weird.


Please file this issue here Issues · esp8266/Arduino · GitHub