mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:17:34 +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();
|
canonicalParts.takeLast();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
canonicalParts.append(part);
|
if (!part.isEmpty())
|
||||||
|
canonicalParts.append(part);
|
||||||
}
|
}
|
||||||
if (canonicalParts.isEmpty()) {
|
if (canonicalParts.isEmpty()) {
|
||||||
m_string = "/";
|
m_string = "/";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue