Skip to content
Snippets Groups Projects
Commit e4ee6548 authored by ShadowNinja's avatar ShadowNinja
Browse files

Fix fs::RemoveRelativePathComponents for paths with a leading dot component

Previously, paths like ./worlds would be resolved to /worlds since the
leading dot was considered just as irrelevant as a dot in the middle of
the path.
parent 3af5eef9
No related branches found
No related tags found
No related merge requests found
......@@ -631,7 +631,7 @@ std::string RemoveRelativePathComponents(std::string path)
std::string component = path.substr(component_start,
component_end - component_start);
bool remove_this_component = false;
if(component == "."){
if(component == "." && component_start != 0){
remove_this_component = true;
}
else if(component == ".."){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment