From 6a678f660438abea881145fa38c8a1f74c6bbb99 Mon Sep 17 00:00:00 2001 From: Tobias Markus Date: Sat, 10 May 2014 12:53:58 +0200 Subject: [PATCH] Correctly parse file:// urls --- src/supertux/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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); -- 2.11.0