forked from 0ad/0ad
Fix OOS-log paths to work on Windows
This was SVN commit r10434.
This commit is contained in:
parent
dfc92de51b
commit
18e595a5a6
@ -523,9 +523,11 @@ void CSimulation2Impl::DumpState()
|
||||
{
|
||||
PROFILE("DumpState");
|
||||
|
||||
std::wstringstream name;
|
||||
name << L"sim_log/" << getpid() << L"/" << std::setw(5) << std::setfill(L'0') << m_TurnNumber << L".txt";
|
||||
OsPath path = psLogDir() / name.str();
|
||||
std::stringstream pid;
|
||||
pid << getpid();
|
||||
std::stringstream name;\
|
||||
name << std::setw(5) << std::setfill('0') << m_TurnNumber << ".txt";
|
||||
OsPath path = psLogDir() / "sim_log" / pid.str() / name.str();
|
||||
CreateDirectories(path.Parent(), 0700);
|
||||
std::ofstream file (OsString(path).c_str(), std::ofstream::out | std::ofstream::trunc);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user