lib/relaton/db.rb in relaton-0.5.2 vs lib/relaton/db.rb in relaton-0.5.3
- old
+ new
@@ -190,11 +190,10 @@
# @return [PStore]
def open_cache_biblio(dir, global: true)
return nil if dir.nil?
db = DbCache.new dir
- # if File.exist? dir
if global
unless db.check_version?
FileUtils.rm_rf(Dir.glob(dir + "/*"), secure: true)
warn "Global cache version is obsolete and cleared."
end
@@ -202,11 +201,9 @@
elsif db.check_version? then db
else
warn "Local cache version is obsolete."
nil
end
- # else db.set_version
- # end
end
# Check if version of the DB match to the gem version.
# @param cache_db [String] DB directory
# @return [TrueClass, FalseClass]