elixir-nx / hnswlib

Elixir binding for the hnswlib library.
Apache License 2.0
52 stars 9 forks source link

add safety check for missing file #2

Closed andrew-combs closed 1 year ago

andrew-combs commented 1 year ago

HNSWLib.Index.load_index/3 fails with a seg fault if the filepath points to a file that is either missing or corrupted. This checks to ensure the file exists before attempting to read it.