summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage
diff options
context:
space:
mode:
authorLane Kolbly <lane@rscheme.org>2017-09-07 14:41:16 +0200
committerAlexander Harkness <me@bearbin.net>2017-09-07 14:41:16 +0200
commitb12f4ef7d58cfe4d815feb2db1f88f223c7f2a61 (patch)
treec7e2a8db5676c8599ce76b212491dd35fd883c1c /src/WorldStorage
parentLighting now generally consistent with vanilla (#3988) (diff)
downloadcuberite-b12f4ef7d58cfe4d815feb2db1f88f223c7f2a61.tar
cuberite-b12f4ef7d58cfe4d815feb2db1f88f223c7f2a61.tar.gz
cuberite-b12f4ef7d58cfe4d815feb2db1f88f223c7f2a61.tar.bz2
cuberite-b12f4ef7d58cfe4d815feb2db1f88f223c7f2a61.tar.lz
cuberite-b12f4ef7d58cfe4d815feb2db1f88f223c7f2a61.tar.xz
cuberite-b12f4ef7d58cfe4d815feb2db1f88f223c7f2a61.tar.zst
cuberite-b12f4ef7d58cfe4d815feb2db1f88f223c7f2a61.zip
Diffstat (limited to 'src/WorldStorage')
-rwxr-xr-xsrc/WorldStorage/WSSAnvil.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index 8f4d41598..158f7a819 100755
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -85,7 +85,7 @@ cWSSAnvil::cWSSAnvil(cWorld * a_World, int a_CompressionFactor) :
{
// Create a level.dat file for mapping tools, if it doesn't already exist:
AString fnam;
- Printf(fnam, "%s%clevel.dat", a_World->GetName().c_str(), cFile::PathSeparator);
+ Printf(fnam, "%s%clevel.dat", a_World->GetDataPath().c_str(), cFile::PathSeparator);
if (!cFile::Exists(fnam))
{
cFastNBTWriter Writer;
@@ -180,7 +180,7 @@ void cWSSAnvil::ChunkLoadFailed(int a_ChunkX, int a_ChunkZ, const AString & a_Re
{
// Construct the filename for offloading:
AString OffloadFileName;
- Printf(OffloadFileName, "%s%cregion%cbadchunks", m_World->GetName().c_str(), cFile::PathSeparator, cFile::PathSeparator);
+ Printf(OffloadFileName, "%s%cregion%cbadchunks", m_World->GetDataPath().c_str(), cFile::PathSeparator, cFile::PathSeparator);
cFile::CreateFolder(FILE_IO_PREFIX + OffloadFileName);
auto t = time(nullptr);
struct tm stm;
@@ -286,7 +286,7 @@ cWSSAnvil::cMCAFile * cWSSAnvil::LoadMCAFile(const cChunkCoords & a_Chunk)
// Load it anew:
AString FileName;
- Printf(FileName, "%s%cregion", m_World->GetName().c_str(), cFile::PathSeparator);
+ Printf(FileName, "%s%cregion", m_World->GetDataPath().c_str(), cFile::PathSeparator);
cFile::CreateFolder(FILE_IO_PREFIX + FileName);
AppendPrintf(FileName, "/r.%d.%d.mca", RegionX, RegionZ);
cMCAFile * f = new cMCAFile(*this, FileName, RegionX, RegionZ);