Skip to content

Commit 22cf974

Browse files
committed
Close file handles for correct flush
1 parent 6e13a9b commit 22cf974

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/main/dumpers/concommands/concommands.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ void DumpConVars()
283283

284284
Globals::stringsIgnoreStream << cvar.GetName() << "\n";
285285
}
286+
287+
output.close();
286288
}
287289

288290
void DumpCommands()
@@ -320,6 +322,8 @@ void DumpCommands()
320322

321323
Globals::stringsIgnoreStream << command.GetName() << "\n";
322324
}
325+
326+
output.close();
323327
}
324328

325329
void Dump()

src/main/dumpers/schemas/json_exporter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ void Dump(const std::vector<IntermediateSchemaEnum>& enums, const std::vector<In
253253

254254
std::ofstream output(Globals::outputPath / "schemas.json");
255255
output << root.dump(-1);
256+
output.close();
256257

257258
spdlog::info("Wrote schemas.json ({} classes, {} enums)", classesArray.size(), enumsArray.size());
258259
}

src/main/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ int main(int argc, char** argv)
8787

8888
std::ofstream file(Globals::outputPath / ".stringsignore");
8989
file << Globals::stringsIgnoreStream.str();
90+
file.close();
9091

9192
spdlog::info("Dumped successfully");
9293

0 commit comments

Comments
 (0)