[keel] Make pack file copy logging nest for dir level
This commit is contained in:
parent
71313ed8f4
commit
b7990ed25b
@ -135,8 +135,10 @@ static ox::Error transformClaw(
|
||||
static ox::Error copy(
|
||||
ox::FileSystem &src,
|
||||
ox::FileSystem &dest,
|
||||
ox::CRStringView path) noexcept {
|
||||
oxOutf("copying directory: {}\n", path);
|
||||
ox::CRStringView path,
|
||||
ox::CRStringView logPrefix = "") noexcept {
|
||||
oxOutf("{}copying directory: {}\n", logPrefix, path);
|
||||
auto const childLogPrefix = ox::sfmt("{}\t", logPrefix);
|
||||
// copy
|
||||
oxRequire(fileList, src.ls(path));
|
||||
for (auto const&name : fileList) {
|
||||
@ -147,10 +149,10 @@ static ox::Error copy(
|
||||
oxRequire(stat, src.stat(currentFile));
|
||||
if (stat.fileType == ox::FileType::Directory) {
|
||||
oxReturnError(dest.mkdir(currentFile, true));
|
||||
oxReturnError(copy(src, dest, currentFile + '/'));
|
||||
oxReturnError(copy(src, dest, currentFile + '/', childLogPrefix));
|
||||
} else {
|
||||
// load file
|
||||
oxOutf("copying file: {}...", currentFile);
|
||||
oxOutf("{}copying file: {}...", childLogPrefix, currentFile);
|
||||
ox::StringView status = "failed";
|
||||
oxDefer [&status] {
|
||||
oxOutf(" {}\n", status);
|
||||
|
Loading…
Reference in New Issue
Block a user