New total reboot counter handling #708

Merged
muellerr merged 16 commits from total-boot-counter-file into main 2023-06-26 15:33:22 +02:00
Showing only changes of commit d88ffb1734 - Show all commits

View File

@ -1602,7 +1602,7 @@ void CoreController::performRebootWatchdogHandling(bool recreateFile) {
std::string legacyPath = currMntPrefix + LEGACY_REBOOT_WATCHDOG_FILE; std::string legacyPath = currMntPrefix + LEGACY_REBOOT_WATCHDOG_FILE;
std::error_code e; std::error_code e;
// TODO: Remove at some point in the future. // TODO: Remove at some point in the future.
if (std::filesystem::exists(legacyPath)) { if (std::filesystem::exists(legacyPath, e)) {
meggert marked this conversation as resolved Outdated

use variant with error_code instead

use variant with `error_code` instead
// Old file might still exist, so copy it to new path // Old file might still exist, so copy it to new path
std::filesystem::copy(legacyPath, path, std::filesystem::copy_options::overwrite_existing, e); std::filesystem::copy(legacyPath, path, std::filesystem::copy_options::overwrite_existing, e);
if (e) { if (e) {