Skip to content

Commit

Permalink
Replace unix-style paths with platform-specific paths when adding
Browse files Browse the repository at this point in the history
mapmod paths to search paths. This should fix ticket:3759. Patch
by crabster, modified by me.
  • Loading branch information
perim committed Dec 8, 2012
1 parent 3f1d0ab commit 1fd7036
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/init.cpp
Expand Up @@ -368,8 +368,9 @@ bool rebuildSearchPath( searchPathMode mode, bool force )
// Add the selected map first, for mapmod support
if (current_map != NULL)
{
std::string realPathAndDir = std::string(PHYSFS_getRealDir(current_map)) + current_map;
PHYSFS_addToSearchPath(realPathAndDir.c_str(), PHYSFS_APPEND);
QString realPathAndDir = QString::fromUtf8(PHYSFS_getRealDir(current_map)) + current_map;
realPathAndDir.replace('/', PHYSFS_getDirSeparator()); // Windows fix
PHYSFS_addToSearchPath(realPathAndDir.toUtf8().constData(), PHYSFS_APPEND);
}
curSearchPath = searchPathRegistry;
while (curSearchPath->lowerPriority)
Expand Down

0 comments on commit 1fd7036

Please sign in to comment.