FS helpers #604
@ -1010,7 +1010,11 @@ ReturnValue_t CoreController::actionListDirectoryDumpDirectly(ActionId_t actionI
|
||||
const char *repoName = parser.getRepoName(repoNameLen);
|
||||
|
||||
oss << " " << repoName << " > " << LIST_DIR_DUMP_WORK_FILE;
|
||||
sif::info << "Executing " << oss.str() << " for direct dump" << std::endl;
|
||||
sif::info << "Executing " << oss.str() << " for direct dump";
|
||||
if (parser.compressionOptionSet()) {
|
||||
sif::info << " with compression";
|
||||
}
|
||||
sif::info << std::endl;
|
||||
int ret = std::system(oss.str().c_str());
|
||||
if (ret != 0) {
|
||||
utility::handleSystemError(result, "CoreController::actionListDirectoryDumpDirectly");
|
||||
@ -1102,10 +1106,11 @@ ReturnValue_t CoreController::actionListDirectoryIntoFile(ActionId_t actionId,
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
|
||||
// Compression will add a .gz ending. I don't have any issue with this, it makes it explicit
|
||||
// that this is a compressed file.
|
||||
if (parser.compressionOptionSet()) {
|
||||
std::string compressedName = targetFileName + std::string(".gz");
|
||||
oss.str("");
|
||||
oss << "gzip -c " << compressedName << " > " << targetFileName;
|
||||
oss << "gzip " << targetFileName;
|
||||
sif::info << "Compressing directory listing: " << oss.str() << std::endl;
|
||||
ret = std::system(oss.str().c_str());
|
||||
if (ret != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user