Skip to content

Commit eceed51

Browse files
authored
Bypass file_server for some file existence checks (#390)
1 parent eb8c927 commit eceed51

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/language_server/lib/language_server/diagnostics.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ defmodule ElixirLS.LanguageServer.Diagnostics do
114114
defp file_path(file, root_path) do
115115
path = Path.join([root_path, file])
116116

117-
if File.exists?(path) do
117+
if File.exists?(path, [:raw]) do
118118
{:ok, path}
119119
else
120120
file_path_in_umbrella(file, root_path)

apps/language_server/lib/language_server/providers/workspace_symbols.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ defmodule ElixirLS.LanguageServer.Providers.WorkspaceSymbols do
253253
with true <- Code.ensure_loaded?(module),
254254
path when not is_nil(path) <- module.module_info(:compile)[:source],
255255
path_binary = List.to_string(path),
256-
true <- File.exists?(path_binary) do
256+
true <- File.exists?(path_binary, [:raw]) do
257257
path_binary
258258
else
259259
_ -> nil
@@ -265,7 +265,7 @@ defmodule ElixirLS.LanguageServer.Providers.WorkspaceSymbols do
265265
with beam_file when not is_nil(beam_file) <-
266266
ErlangSourceFile.get_beam_file(module, beam_file),
267267
erl_file = ErlangSourceFile.beam_file_to_erl_file(beam_file),
268-
true <- File.exists?(erl_file) do
268+
true <- File.exists?(erl_file, [:raw]) do
269269
erl_file
270270
else
271271
_ -> nil

0 commit comments

Comments
 (0)