mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 21:10:30 +00:00
Merge pull request #6496 from imp0s5ible/imp-relative-path-fix
Fix #6495 - Handle starting separator during name comparison
This commit is contained in:
@@ -349,6 +349,9 @@ _get_common_path_len :: proc(base, target: string) -> int {
|
||||
end := min(len(base), len(target))
|
||||
for j in 0..=end {
|
||||
if j == end || _is_path_separator(base[j]) {
|
||||
if i < end && _is_path_separator(base[i]) && _is_path_separator(target[i]) {
|
||||
i += 1
|
||||
}
|
||||
if strings.equal_fold(base[i:j], target[i:j]) {
|
||||
i = j
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user