diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index 4e30e2d7..08889d70 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -993,6 +993,7 @@ 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; int ret = std::system(oss.str().c_str()); if (ret != 0) { utility::handleSystemError(result, "CoreController::actionListDirectoryDumpDirectly"); @@ -1017,7 +1018,10 @@ ReturnValue_t CoreController::actionListDirectoryDumpDirectly(ActionId_t actionI } } std::array 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; size_t totalFileSize = std::filesystem::file_size(LIST_DIR_DUMP_WORK_FILE, e); size_t dumpedBytes = 0;