whitecatboard / Lua-RTOS-ESP32

Lua RTOS for ESP32
Other
1.19k stars 221 forks source link

fix editor behaviour in out-of-memory scenario #268

Closed the0ne closed 5 years ago

the0ne commented 5 years ago

if the memory is too low, the editor will exit with error but leave a previously-not-existing but newly created file in the file system.

now, in case of error, we make sure to unlink the file again.

jolivepetrus commented 5 years ago

@the0ne,

As far I can see, editing an existing file (size > 0) (for example autorun.lua) in a low memory scenario, unlinks the file.

the0ne commented 5 years ago

@jolivepetrus did you try that on-device or by analyzing the source code? actually bCreated should be false for pre-existing files so those shouldn't be deleted in any case