Commit 6e755138 authored by Kilian Lackhove's avatar Kilian Lackhove
Browse files

addressed some of chris remarks

parent 7cf9c651
......@@ -1988,11 +1988,11 @@ namespace Nektar
std::string outname = m_sessionName + "_" +
boost::lexical_cast<std::string>(n);
int cnt = 0;
while (std::ifstream(std::string(outname + ".chk").c_str()))
while (boost::filesystem::exists(outname + ".chk"))
{
outname = m_sessionName + "_" +
boost::lexical_cast<std::string>(n) + "_" +
boost::lexical_cast<std::string>(cnt);
boost::lexical_cast<std::string>(cnt++);
}
WriteFld(outname + ".chk");
......@@ -2011,11 +2011,11 @@ namespace Nektar
std::string outname = m_sessionName + "_" +
boost::lexical_cast<std::string>(n);
int cnt = 0;
while (std::ifstream(std::string(outname + ".chk").c_str()))
while (boost::filesystem::exists(outname + ".chk"))
{
outname = m_sessionName + "_" +
boost::lexical_cast<std::string>(n) + "_" +
boost::lexical_cast<std::string>(cnt);
boost::lexical_cast<std::string>(cnt++);
}
WriteFld(outname, field, fieldcoeffs, variables);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment