Custom OBSW update path #582

Merged
muellerr merged 6 commits from feature_custom_obsw_update_path into develop 2023-04-11 16:12:43 +02:00
Showing only changes of commit a81b24b67f - Show all commits

View File

@ -1923,7 +1923,14 @@ ReturnValue_t CoreController::executeSwUpdate(SwUpdateSources sourceDir, const u
} else if (sourceDir == SwUpdateSources::TMP_DIR) {
prefixPath = path("/tmp");
}
path archivePath = prefixPath / path(config::OBSW_UPDATE_ARCHIVE_FILE_NAME);
path archivePath;
// It is optionally possible to supply the source file path
if (size > 2) {
archivePath = prefixPath / std::string(reinterpret_cast<const char *>(data + 2), size - 2);
} else {
archivePath = prefixPath / path(config::OBSW_UPDATE_ARCHIVE_FILE_NAME);
}
sif::info << "Updating with archive path " << archivePath << std::endl;
std::error_code e;
if (not exists(archivePath, e)) {
return HasFileSystemIF::FILE_DOES_NOT_EXIST;