Skip to content

Commit ebb0511

Browse files
committed
attempt to fix another dets error
1 parent d6b65bc commit ebb0511

File tree

1 file changed

+6
-0
lines changed
  • apps/language_server/lib/language_server

1 file changed

+6
-0
lines changed

apps/language_server/lib/language_server/tracer.ex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,12 @@ defmodule ElixirLS.LanguageServer.Tracer do
206206

207207
{:ok, _} = :dets.open_file(table_name, opts)
208208

209+
{:error, {:cannot_repair, _} = reason} ->
210+
Logger.warning("Unable to open DETS #{path}: #{inspect(reason)}")
211+
File.rm_rf!(path)
212+
213+
{:ok, _} = :dets.open_file(table_name, opts)
214+
209215
{:error, {:not_a_dets_file, _} = reason} ->
210216
Logger.warning("Unable to open DETS #{path}: #{inspect(reason)}")
211217
File.rm_rf!(path)

0 commit comments

Comments
 (0)