Skip to content

Commit

Permalink
Replace deprecated boost:filesystem::ifstream/ofstream with std::
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrohr authored and AnarManafov committed Jul 26, 2022
1 parent 3ee4b31 commit 4d45466
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dds-agent/src/CommanderChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ bool CCommanderChannel::on_cmdACTIVATE_USER_TASK(SCommandAttachmentImpl<cmdACTIV
const fs::path pathTaskWrapper(pathSlotDir / "dds_user_task_wrapper.sh");

// Replace placeholders in the task wrapper
fs::ifstream fTaskWrapper(pathTaskWrapperIn.native());
std::ifstream fTaskWrapper(pathTaskWrapperIn.native());
if (!fTaskWrapper.is_open())
throw runtime_error("Failed to open task wrapper template.");
string sTaskWrapperContent((istreambuf_iterator<char>(fTaskWrapper)), istreambuf_iterator<char>());
Expand All @@ -676,7 +676,7 @@ bool CCommanderChannel::on_cmdACTIVATE_USER_TASK(SCommandAttachmentImpl<cmdACTIV
// JOB SCRIPT --- Task Executable
boost::replace_all(sTaskWrapperContent, "# %DDS_USER_TASK%", sUsrExe);

fs::ofstream fTaskWrapperOut(pathTaskWrapper.native());
std::ofstream fTaskWrapperOut(pathTaskWrapper.native());
if (!fTaskWrapperOut.is_open())
throw runtime_error("Failed to create task wrapper script.");

Expand Down

0 comments on commit 4d45466

Please sign in to comment.