lib/spandx/rubygems/offline_index.rb in spandx-0.10.0 vs lib/spandx/rubygems/offline_index.rb in spandx-0.10.1
- old
+ new
@@ -26,13 +26,16 @@
def search(name:, version:)
db.open(datafile_for(name)) do |io|
search_for("#{name}-#{version}", io, lines_in(io))
end
+ rescue Errno::ENOENT => error
+ Spandx.logger.error(error)
+ nil
end
def datafile_for(name)
- "lib/spandx/rubygems/index/#{key_for(name)}/data"
+ ".index/#{key_for(name)}/rubygems"
end
def lines_in(io)
lines = []
io.seek(0)