Canonicalize range path in FileLines::intersects()
This commit is contained in:
parent
b6f1b516d9
commit
36f0402bac
@ -140,9 +140,12 @@ impl FileLines {
|
|||||||
Some(ref map) => map,
|
Some(ref map) => map,
|
||||||
};
|
};
|
||||||
|
|
||||||
match map.get_vec(range.file_name()) {
|
match canonicalize_path_string(range.file_name()).and_then(|canonical| {
|
||||||
None => false,
|
map.get_vec(&canonical)
|
||||||
Some(ranges) => ranges.iter().any(|r| r.intersects(Range::from(range))),
|
.ok_or(())
|
||||||
|
}) {
|
||||||
|
Ok(ranges) => ranges.iter().any(|r| r.intersects(Range::from(range))),
|
||||||
|
Err(_) => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user