Merge develop to main (#334)

- `FileBrowser` app now supports deleting directories (recursively)
- `DevelopmentService` and `tactility.py` now support the app `uninstall` action
- Fix crash for `File` app: implement file locking in several places (SPI SD cards need it)
- Remove I2C configuration from `M5stackCardputer.cpp` because we don't support the "Cardputer Adv" variant in that firmware.
This commit is contained in:
Ken Van Hoeylandt
2025-09-14 13:37:34 +02:00
committed by GitHub
parent 7027da00b8
commit d5c94c7a8a
13 changed files with 182 additions and 53 deletions
+21
View File
@@ -223,4 +223,25 @@ bool install(const std::string& path) {
return true;
}
bool uninstall(const std::string& appId) {
TT_LOG_I(TAG, "Uninstalling app %s", appId.c_str());
auto app_path = getInstallPath() + "/" + appId;
return file::withLock<bool>(app_path, [&app_path, &appId]() {
if (!file::isDirectory(app_path)) {
TT_LOG_E(TAG, "App %s not found at ", app_path.c_str());
return false;
}
if (!file::deleteRecursively(app_path)) {
return false;
}
if (!removeApp(appId)) {
TT_LOG_W(TAG, "Failed to remove app %d from registry", appId.c_str());
}
return true;
});
}
} // namespace