From d718b0b34eda84744778fa12a01d5be5f03753d3 Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Tue, 13 Aug 2013 19:15:06 +0200 Subject: Dont write directly to files but rather write and copy a tmp file --- src/serverlist.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/serverlist.cpp') diff --git a/src/serverlist.cpp b/src/serverlist.cpp index bc09f6c0a..4db5f3ecd 100644 --- a/src/serverlist.cpp +++ b/src/serverlist.cpp @@ -105,13 +105,11 @@ bool deleteEntry (ServerListSpec server) } std::string path = ServerList::getFilePath(); - std::ofstream stream (path.c_str()); - if (stream.is_open()) - { - stream<