From 75a14f2250637c2af45c51ae37d40aefe8201724 Mon Sep 17 00:00:00 2001 From: Aleksey Krichevskiy Date: Sun, 31 Jan 2021 17:29:13 +0300 Subject: [PATCH] ProfileManager: trunc flag to file overwrite --- ProfileManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProfileManager.cpp b/ProfileManager.cpp index e8a6c822..575a8547 100644 --- a/ProfileManager.cpp +++ b/ProfileManager.cpp @@ -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 |