FS helpers #604

Merged
muellerr merged 9 commits from core_ctrl_fs_helpers into develop 2023-04-16 02:57:16 +02:00
Showing only changes of commit f2c71d962a - Show all commits

View File

@ -1066,10 +1066,11 @@ ReturnValue_t CoreController::actionListDirectoryDumpDirectly(ActionId_t actionI
return result;
}
segmentIdx++;
dumpedBytes += nextDumpLen;
}
// Remove work file when we are done
std::filesystem::remove(LIST_DIR_DUMP_WORK_FILE, e);
return returnvalue::OK;
return EXECUTION_FINISHED;
}
ReturnValue_t CoreController::actionListDirectoryIntoFile(ActionId_t actionId,
@ -1112,7 +1113,7 @@ ReturnValue_t CoreController::actionListDirectoryIntoFile(ActionId_t actionId,
return returnvalue::FAILED;
}
}
return returnvalue::OK;
return EXECUTION_FINISHED;
}
ReturnValue_t CoreController::initBootCopyFile() {
@ -2198,6 +2199,8 @@ ReturnValue_t CoreController::executeSwUpdate(SwUpdateSources sourceDir, const u
if (not exists(archivePath, e)) {
return HasFileSystemIF::FILE_DOES_NOT_EXIST;
}
// TODO: Decompressing without limiting memory usage with xz is actually a bit risky..
// But has not been an issue so far.
ostringstream cmd("tar -xJf", ios::app);
cmd << " " << archivePath << " -C " << prefixPath;
int result = system(cmd.str().c_str());