diff options
Diffstat (limited to 'cli/lsp/cache.rs')
-rw-r--r-- | cli/lsp/cache.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/lsp/cache.rs b/cli/lsp/cache.rs index e6186030a..5dae38c20 100644 --- a/cli/lsp/cache.rs +++ b/cli/lsp/cache.rs @@ -184,4 +184,13 @@ impl LspCache { .as_ref()?; vendor.get_remote_url(&path) } + + pub fn is_valid_file_referrer(&self, specifier: &ModuleSpecifier) -> bool { + if let Ok(path) = specifier_to_file_path(specifier) { + if !path.starts_with(&self.deno_dir().root) { + return true; + } + } + false + } } |