From: Tobias Markus Date: Sat, 10 May 2014 10:53:58 +0000 (+0200) Subject: Correctly parse file:// urls X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=6a678f660438abea881145fa38c8a1f74c6bbb99;p=supertux.git Correctly parse file:// urls --- diff --git a/src/supertux/main.cpp b/src/supertux/main.cpp index e3002fd95..d78330b61 100644 --- a/src/supertux/main.cpp +++ b/src/supertux/main.cpp @@ -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);