some important tweaks
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
This commit is contained in:
parent
4e7b774d32
commit
6040cd2d1e
@ -1637,7 +1637,10 @@ void CoreController::performRebootWatchdogHandling(bool recreateFile) {
|
||||
// TODO: Remove at some point in the future.
|
||||
if (std::filesystem::exists(legacyPath)) {
|
||||
// Old file might still exist, so copy it to new path
|
||||
std::filesystem::copy(legacyPath, path);
|
||||
std::filesystem::copy(legacyPath, path, std::filesystem::copy_options::overwrite_existing, e);
|
||||
if (e) {
|
||||
sif::error << "File copy has failed: " << e.message() << std::endl;
|
||||
}
|
||||
}
|
||||
if (not std::filesystem::exists(path, e) or recreateFile) {
|
||||
#if OBSW_VERBOSE_LEVEL >= 1
|
||||
@ -2145,10 +2148,14 @@ void CoreController::rewriteRebootWatchdogFile(RebootWatchdogFile file) {
|
||||
<< "\nnext: " << static_cast<int>(file.mechanismNextChip) << " "
|
||||
<< static_cast<int>(file.mechanismNextCopy) << "\n";
|
||||
}
|
||||
std::error_code e;
|
||||
// TODO: Remove at some point in the future when all images have been updated.
|
||||
if (std::filesystem::exists(legacyPath)) {
|
||||
// Keep those two files in sync
|
||||
std::filesystem::copy(path, legacyPath);
|
||||
std::filesystem::copy(path, legacyPath, std::filesystem::copy_options::overwrite_existing, e);
|
||||
if (e) {
|
||||
sif::error << "File copy has failed: " << e.message() << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user