File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
apps/language_server/lib/language_server Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -170,16 +170,25 @@ defmodule ElixirLS.LanguageServer.Tracer do
170
170
Logger . warning ( "Unable to open DETS #{ path } : #{ inspect ( reason ) } " )
171
171
File . rm_rf! ( path )
172
172
{ :ok , _ } = :dets . open_file ( table_name , opts )
173
+
174
+ { :error , { :file_error , _ , :enoent } = reason } ->
175
+ Logger . warning ( "Unable to open DETS #{ path } : #{ inspect ( reason ) } " )
176
+ :ok = path |> Path . dirname ( ) |> File . mkdir_p ( )
177
+ { :ok , _ } = :dets . open_file ( table_name , opts )
173
178
end
174
179
180
+ Process . sleep ( 200 )
181
+
175
182
case :dets . to_ets ( table_name , table_name ) do
176
183
^ table_name ->
177
184
:ok
178
185
179
186
{ :error , reason } ->
180
187
Logger . warning ( "Unable to read DETS #{ path } : #{ inspect ( reason ) } " )
181
188
File . rm_rf! ( path )
189
+ Process . sleep ( 200 )
182
190
{ :ok , _ } = :dets . open_file ( table_name , opts )
191
+ Process . sleep ( 200 )
183
192
^ table_name = :dets . to_ets ( table_name , table_name )
184
193
end
185
194
end
@@ -345,6 +354,9 @@ defmodule ElixirLS.LanguageServer.Tracer do
345
354
else
346
355
{ :error , reason } ->
347
356
Logger . error ( "Unable to sync DETS #{ table_name } , #{ inspect ( reason ) } " )
357
+
358
+ other ->
359
+ Logger . error ( "Unable to sync DETS #{ table_name } , #{ inspect ( other ) } " )
348
360
end
349
361
end
350
362
You can’t perform that action at this time.
0 commit comments