mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
Don't treat .foo as two path components in path::iterators
We were treating '/.foo' as ['/', '.', 'foo'] instead of ['/', '.foo'], which lead to insanity. Same for '..'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231727 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -49,7 +49,6 @@ namespace {
|
||||
// * empty (in this case we return an empty string)
|
||||
// * either C: or {//,\\}net.
|
||||
// * {/,\}
|
||||
// * {.,..}
|
||||
// * {file,directory}name
|
||||
|
||||
if (path.empty())
|
||||
@ -76,12 +75,6 @@ namespace {
|
||||
if (is_separator(path[0]))
|
||||
return path.substr(0, 1);
|
||||
|
||||
if (path.startswith(".."))
|
||||
return path.substr(0, 2);
|
||||
|
||||
if (path[0] == '.')
|
||||
return path.substr(0, 1);
|
||||
|
||||
// * {file,directory}name
|
||||
size_t end = path.find_first_of(separators);
|
||||
return path.substr(0, end);
|
||||
|
Reference in New Issue
Block a user