Skip to content

Commit

Permalink
attempt to fix another dets error
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Jan 11, 2024
1 parent d6b65bc commit ebb0511
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/language_server/lib/language_server/tracer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ defmodule ElixirLS.LanguageServer.Tracer do

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

{:error, {:cannot_repair, _} = reason} ->
Logger.warning("Unable to open DETS #{path}: #{inspect(reason)}")
File.rm_rf!(path)

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

{:error, {:not_a_dets_file, _} = reason} ->
Logger.warning("Unable to open DETS #{path}: #{inspect(reason)}")
File.rm_rf!(path)
Expand Down

0 comments on commit ebb0511

Please sign in to comment.