diff --git a/crates/ruff_db/src/files.rs b/crates/ruff_db/src/files.rs index 0019c9fe15..d7b5ecdeb5 100644 --- a/crates/ruff_db/src/files.rs +++ b/crates/ruff_db/src/files.rs @@ -190,10 +190,8 @@ impl Files { let roots = self.inner.roots.read().unwrap(); let absolute = SystemPath::absolute(path, db.system().current_directory()); - // We need to resolve away symlinks here to avoid getting confused about subdirectories. - let canonicalized = db.system().canonicalize_path(&absolute).unwrap_or(absolute); - roots.at(&canonicalized) + roots.at(&absolute) } /// The same as [`Self::root`] but panics if no root is found.