diff --git a/central_backend/src/ota/ota_manager.rs b/central_backend/src/ota/ota_manager.rs index f9c713d..c4fb257 100644 --- a/central_backend/src/ota/ota_manager.rs +++ b/central_backend/src/ota/ota_manager.rs @@ -42,6 +42,11 @@ pub fn delete_update(platform: OTAPlatform, version: &semver::Version) -> anyhow pub fn get_ota_updates_for_platform(platform: OTAPlatform) -> anyhow::Result> { let ota_path = AppConfig::get().ota_platform_dir(platform); + // Check if the directory dedicated to the updates of the platform exists + if !ota_path.is_dir() { + return Ok(Vec::new()); + } + let mut out = Vec::new(); for e in std::fs::read_dir(ota_path)? {