summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/ScoreboardSerializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/WorldStorage/ScoreboardSerializer.cpp')
-rw-r--r--src/WorldStorage/ScoreboardSerializer.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/WorldStorage/ScoreboardSerializer.cpp b/src/WorldStorage/ScoreboardSerializer.cpp
index fa094a033..c65e13f98 100644
--- a/src/WorldStorage/ScoreboardSerializer.cpp
+++ b/src/WorldStorage/ScoreboardSerializer.cpp
@@ -31,16 +31,12 @@ cScoreboardSerializer::cScoreboardSerializer(const AString & a_WorldName, cScore
bool cScoreboardSerializer::Load(void)
{
- cFile File;
- if (!File.Open(FILE_IO_PREFIX + m_Path, cFile::fmRead))
+ AString Data = cFile::ReadWholeFile(FILE_IO_PREFIX + m_Path);
+ if (Data.empty())
{
return false;
}
- AString Data;
- File.ReadRestOfFile(Data);
- File.Close();
-
AString Uncompressed;
int res = UncompressStringGZIP(Data.data(), Data.size(), Uncompressed);