[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(
|
static ox::Error copy(
|
||||||
ox::FileSystem &src,
|
ox::FileSystem &src,
|
||||||
ox::FileSystem &dest,
|
ox::FileSystem &dest,
|
||||||
ox::CRStringView path) noexcept {
|
ox::CRStringView path,
|
||||||
oxOutf("copying directory: {}\n", path);
|
ox::CRStringView logPrefix = "") noexcept {
|
||||||
|
oxOutf("{}copying directory: {}\n", logPrefix, path);
|
||||||
|
auto const childLogPrefix = ox::sfmt("{}\t", logPrefix);
|
||||||
// copy
|
// copy
|
||||||
oxRequire(fileList, src.ls(path));
|
oxRequire(fileList, src.ls(path));
|
||||||
for (auto const&name : fileList) {
|
for (auto const&name : fileList) {
|
||||||
@ -147,10 +149,10 @@ static ox::Error copy(
|
|||||||
oxRequire(stat, src.stat(currentFile));
|
oxRequire(stat, src.stat(currentFile));
|
||||||
if (stat.fileType == ox::FileType::Directory) {
|
if (stat.fileType == ox::FileType::Directory) {
|
||||||
oxReturnError(dest.mkdir(currentFile, true));
|
oxReturnError(dest.mkdir(currentFile, true));
|
||||||
oxReturnError(copy(src, dest, currentFile + '/'));
|
oxReturnError(copy(src, dest, currentFile + '/', childLogPrefix));
|
||||||
} else {
|
} else {
|
||||||
// load file
|
// load file
|
||||||
oxOutf("copying file: {}...", currentFile);
|
oxOutf("{}copying file: {}...", childLogPrefix, currentFile);
|
||||||
ox::StringView status = "failed";
|
ox::StringView status = "failed";
|
||||||
oxDefer [&status] {
|
oxDefer [&status] {
|
||||||
oxOutf(" {}\n", status);
|
oxOutf(" {}\n", status);
|
||||||
|
Loading…
Reference in New Issue
Block a user