mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
AK: Make LexicalPath handle relative paths correctly
Previously LexicalPath would consider "." and ".." as equivalent to "/". This is not true though.
This commit is contained in:
parent
ebb1d9740e
commit
c99fd217e2
2 changed files with 5 additions and 1 deletions
|
@ -55,7 +55,7 @@ void LexicalPath::canonicalize()
|
|||
}
|
||||
}
|
||||
if (canonical_parts.is_empty()) {
|
||||
m_string = m_basename = m_dirname = "/";
|
||||
m_string = m_basename = m_dirname = m_is_absolute ? "/" : ".";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue