mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Don't include empty segments in canonicalized paths.
This makes "/foo/" and "/foo" both resolve to "/foo".
This commit is contained in:
@@ -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 = "/";
|
||||
|
||||
Reference in New Issue
Block a user