Skip to content

Commit d9c2086

Browse files
committed
fix: loading local files on linux
1 parent 0fd4a4b commit d9c2086

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/noggit/World.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ bool World::IsEditableWorld(int pMapId)
5858
}
5959

6060
std::stringstream ssfilename;
61-
ssfilename << "World\\Maps\\" << lMapName << "\\" << lMapName << ".wdt";
61+
ssfilename << "world/maps/" << lMapName << "/" << lMapName << ".wdt";
6262

6363
if (!MPQFile::exists(ssfilename.str()))
6464
{

src/noggit/map_horizon.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ namespace noggit
9292
map_horizon::map_horizon(const std::string& basename, const MapIndex * const index)
9393
{
9494
std::stringstream filename;
95-
filename << "World\\Maps\\" << basename << "\\" << basename << ".wdl";
95+
filename << "world/maps/" << basename << "/" << basename << ".wdl";
9696
_filename = filename.str();
9797

9898
if (!MPQFile::exists(_filename))
9999
{
100-
LogError << "file \"World\\Maps\\" << basename << "\\" << basename << ".wdl\" does not exist." << std::endl;
100+
LogError << "file " << filename.str() << " does not exist." << std::endl;
101101
return;
102102
}
103103

src/noggit/map_index.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ MapIndex::MapIndex (const std::string &pBasename, int map_id, World* world)
8787
theFile.seekRelative(4);
8888

8989
std::stringstream adt_filename;
90-
adt_filename << "World\\Maps\\" << basename << "\\" << basename << "_" << i << "_" << j << ".adt";
90+
adt_filename << "world/maps/" << basename << "/" << basename << "_" << i << "_" << j << ".adt";
9191

9292
mTiles[j][i].tile = nullptr;
9393
mTiles[j][i].onDisc = MPQFile::existsOnDisk(adt_filename.str());
@@ -317,7 +317,7 @@ MapTile* MapIndex::loadTile(const tile_index& tile, bool reloading)
317317
}
318318

319319
std::stringstream filename;
320-
filename << "World\\Maps\\" << basename << "\\" << basename << "_" << tile.x << "_" << tile.z << ".adt";
320+
filename << "world/maps/" << basename << "/" << basename << "_" << tile.x << "_" << tile.z << ".adt";
321321

322322
if (!MPQFile::exists(filename.str()))
323323
{

0 commit comments

Comments
 (0)