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)
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 {