earlephilhower / mklittlefs

Utility for creating LittleFS images for upload on the ESP8266 and RP2040 Pico
MIT License
159 stars 54 forks source link

Refactor main.cpp to guarantee the binary consistency of image. #28

Closed ysy4tc3 closed 1 year ago

ysy4tc3 commented 2 years ago

As the readdir doesn't guarantee the order, the creating order may be different in various enviroments. Here using BFS instead of DFS, and sort the sequence, the creating order can be guaranteed. This is good for binary consistency.

Also here the timestamp is not set defaultly, because it will make a little bit different between images.