Commit e35da6e7 authored by Gauthier Quesnel's avatar Gauthier Quesnel
Browse files

gui: fix opening of output/observation files during simulation

parent 328adfcc
...@@ -57,6 +57,10 @@ observation_file_output_initialize(const irt::observer& obs, ...@@ -57,6 +57,10 @@ observation_file_output_initialize(const irt::observer& obs,
auto* output = reinterpret_cast<file_output*>(obs.user_data); auto* output = reinterpret_cast<file_output*>(obs.user_data);
output->tl = t; output->tl = t;
std::filesystem::path file(obs.name.begin());
file.replace_extension(".dat");
output->ofs.open(file);
if (output->ofs.is_open()) if (output->ofs.is_open())
fmt::print(output->ofs, "t,{}\n", output->name.c_str()); fmt::print(output->ofs, "t,{}\n", output->name.c_str());
} }
......
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