mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:57:44 +00:00
Don't include empty segments in canonicalized paths.
This makes "/foo/" and "/foo" both resolve to "/foo".
This commit is contained in:
parent
39d6b96d21
commit
c653bb09b3
1 changed files with 2 additions and 1 deletions
|
@ -26,7 +26,8 @@ bool FileSystemPath::canonicalize(bool resolveSymbolicLinks)
|
|||
canonicalParts.takeLast();
|
||||
continue;
|
||||
}
|
||||
canonicalParts.append(part);
|
||||
if (!part.isEmpty())
|
||||
canonicalParts.append(part);
|
||||
}
|
||||
if (canonicalParts.isEmpty()) {
|
||||
m_string = "/";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue