FS helpers #604
@ -993,6 +993,7 @@ ReturnValue_t CoreController::actionListDirectoryDumpDirectly(ActionId_t actionI
|
|||||||
const char *repoName = parser.getRepoName(repoNameLen);
|
const char *repoName = parser.getRepoName(repoNameLen);
|
||||||
|
|
||||||
oss << " " << repoName << " > " << LIST_DIR_DUMP_WORK_FILE;
|
oss << " " << repoName << " > " << LIST_DIR_DUMP_WORK_FILE;
|
||||||
|
sif::info << "Executing " << oss.str() << " for direct dump" << std::endl;
|
||||||
int ret = std::system(oss.str().c_str());
|
int ret = std::system(oss.str().c_str());
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
utility::handleSystemError(result, "CoreController::actionListDirectoryDumpDirectly");
|
utility::handleSystemError(result, "CoreController::actionListDirectoryDumpDirectly");
|
||||||
@ -1017,7 +1018,10 @@ ReturnValue_t CoreController::actionListDirectoryDumpDirectly(ActionId_t actionI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::array<uint8_t, 1024> dirListingBuf{};
|
std::array<uint8_t, 1024> dirListingBuf{};
|
||||||
std::ifstream ifile("/tmp/dir_listing.tmp", std::ios::binary);
|
std::ifstream ifile(LIST_DIR_DUMP_WORK_FILE, std::ios::binary);
|
||||||
|
if (ifile.bad()) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
std::error_code e;
|
std::error_code e;
|
||||||
size_t totalFileSize = std::filesystem::file_size(LIST_DIR_DUMP_WORK_FILE, e);
|
size_t totalFileSize = std::filesystem::file_size(LIST_DIR_DUMP_WORK_FILE, e);
|
||||||
size_t dumpedBytes = 0;
|
size_t dumpedBytes = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user