Skip to content

Commit

Permalink
Correctly parse file:// urls
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbi committed May 10, 2014
1 parent c11d9d5 commit 6a678f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/supertux/main.cpp
Expand Up @@ -631,6 +631,11 @@ Main::run(int argc, char** argv)
// we have a normal path specified at commandline, not a physfs path.
// So we simply mount that path here...
std::string dir = FileSystem::dirname(g_config->start_level);
std::string fileProtocol = "file://";
int position = dir.find(fileProtocol);
if(position != std::string::npos) {
dir = dir.replace(position, fileProtocol.length(), "");
}
log_debug << "Adding dir: " << dir << std::endl;
PHYSFS_addToSearchPath(dir.c_str(), true);

Expand Down

0 comments on commit 6a678f6

Please sign in to comment.