more work on worlds
[supertux.git] / src / file_system.cpp
index b605656..d130307 100644 (file)
@@ -25,7 +25,7 @@ std::string basename(const std::string& filename)
   if(p == std::string::npos)
     return filename;
 
-  return filename.substr(p, filename.size()-p);
+  return filename.substr(p+1, filename.size()-p-1);
 }
 
 std::string normalize(const std::string& filename)
@@ -56,7 +56,7 @@ std::string normalize(const std::string& filename)
     if(pathelem == "..") {
       if(path_stack.empty()) {
 
-        msg_warning("Invalid '..' in path '" << filename << "'");
+        msg_warning << "Invalid '..' in path '" << filename << "'" << std::endl;
         // push it into the result path so that the users sees his error...
         path_stack.push_back(pathelem);
       } else {