diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_vfs/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_vfs/src/lib.rs b/crates/ra_vfs/src/lib.rs index 2c3c35f28..d589a254b 100644 --- a/crates/ra_vfs/src/lib.rs +++ b/crates/ra_vfs/src/lib.rs | |||
@@ -72,12 +72,12 @@ impl RootConfig { | |||
72 | if self.excluded_dirs.iter().any(|it| path.starts_with(it)) { | 72 | if self.excluded_dirs.iter().any(|it| path.starts_with(it)) { |
73 | return None; | 73 | return None; |
74 | } | 74 | } |
75 | let rel_path = path.strip_prefix(&self.root) | 75 | let rel_path = path |
76 | .strip_prefix(&self.root) | ||
76 | .or_else(|err_payload| { | 77 | .or_else(|err_payload| { |
77 | self.canonical_root | 78 | self.canonical_root |
78 | .as_ref() | 79 | .as_ref() |
79 | .map_or(Err(err_payload), | 80 | .map_or(Err(err_payload), |canonical_root| path.strip_prefix(canonical_root)) |
80 | |canonical_root| path.strip_prefix(canonical_root)) | ||
81 | }) | 81 | }) |
82 | .ok()?; | 82 | .ok()?; |
83 | let rel_path = RelativePathBuf::from_path(rel_path).ok()?; | 83 | let rel_path = RelativePathBuf::from_path(rel_path).ok()?; |