Skip to content

Commit e336a96

Browse files
committed
FileSetConfig works with empty set of roots
Closes #5139
1 parent b1a2d01 commit e336a96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/vfs/src/file_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl FileSetConfig {
6969
Ok(it) => it,
7070
Err(it) => it.saturating_sub(1),
7171
};
72-
if path.starts_with(&self.roots[idx].0) {
72+
if !self.roots.is_empty() && path.starts_with(&self.roots[idx].0) {
7373
self.roots[idx].1
7474
} else {
7575
self.len() - 1

0 commit comments

Comments
 (0)