New total reboot counter handling #708
@ -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
|
|||||||
// 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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user
use variant with
error_code
instead