Merge branch 'feature/sdl2'
[supertux.git] / src / supertux / main.cpp
index 73d3e14..5958a92 100644 (file)
@@ -381,7 +381,6 @@ Main::parse_commandline(int argc, char** argv)
       g_config->start_level = arg;
     } else {
       log_warning << "Unknown option '" << arg << "'. Use --help to see a list of options" << std::endl;
-      return true;
     }
   }
 
@@ -582,6 +581,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);