ProfileManager: trunc flag to file overwrite

This commit is contained in:
Aleksey Krichevskiy 2021-01-31 17:29:13 +03:00 committed by Adam Honse
parent bca9407f70
commit 75a14f2250

View file

@ -52,7 +52,7 @@ bool ProfileManager::SaveProfile(std::string profile_name, bool sizes)
/*---------------------------------------------------------*\
| Open an output file in binary mode |
\*---------------------------------------------------------*/
std::ofstream controller_file(configuration_directory + filename, std::ios::out | std::ios::binary);
std::ofstream controller_file(configuration_directory + filename, std::ios::out | std::ios::binary | std::ios::trunc);
/*---------------------------------------------------------*\
| Write header |