mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8284ec09f | ||
|
|
6e982acde8 |
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
# [3.4.4]
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Fix for new installations with filesystem not initializing
|
||||||
|
|
||||||
# [3.4.3]
|
# [3.4.3]
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|||||||
@@ -68,6 +68,16 @@ class FSPersistence {
|
|||||||
JsonObject jsonObject = jsonDocument.to<JsonObject>();
|
JsonObject jsonObject = jsonDocument.to<JsonObject>();
|
||||||
_statefulService->read(jsonObject, _stateReader);
|
_statefulService->read(jsonObject, _stateReader);
|
||||||
|
|
||||||
|
// make directories if required, for new IDF4.2 & LittleFS
|
||||||
|
String path(_filePath);
|
||||||
|
int index = 0;
|
||||||
|
while ((index = path.indexOf('/', index + 1)) != -1) {
|
||||||
|
String segment = path.substring(0, index);
|
||||||
|
if (!_fs->exists(segment)) {
|
||||||
|
_fs->mkdir(segment);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// serialize it to filesystem
|
// serialize it to filesystem
|
||||||
File settingsFile = _fs->open(_filePath, "w");
|
File settingsFile = _fs->open(_filePath, "w");
|
||||||
|
|
||||||
@@ -85,16 +95,6 @@ class FSPersistence {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// make directories if required, for new IDF4.2 & LittleFS
|
|
||||||
String path(_filePath);
|
|
||||||
int index = 0;
|
|
||||||
while ((index = path.indexOf('/', index + 1)) != -1) {
|
|
||||||
String segment = path.substring(0, index);
|
|
||||||
if (!_fs->exists(segment)) {
|
|
||||||
_fs->mkdir(segment);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// serialize the data to the file
|
// serialize the data to the file
|
||||||
serializeJson(jsonDocument, settingsFile);
|
serializeJson(jsonDocument, settingsFile);
|
||||||
settingsFile.close();
|
settingsFile.close();
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define EMSESP_APP_VERSION "3.4.3"
|
#define EMSESP_APP_VERSION "3.4.4"
|
||||||
|
|||||||
Reference in New Issue
Block a user