From 8a3602bb515f3362942c4c9d487199af14014383 Mon Sep 17 00:00:00 2001 From: Alexande B Date: Fri, 29 Mar 2019 20:25:07 +0300 Subject: [PATCH] Delete everything inside cache dir except the dir --- lib/iev/db.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/iev/db.rb b/lib/iev/db.rb index 6ad882e..63b4254 100644 --- a/lib/iev/db.rb +++ b/lib/iev/db.rb @@ -55,7 +55,7 @@ def open_cache_biblio(dir, global: true) db = DbCache.new dir if global unless db.check_version? - FileUtils.rm_rf dir + "/." + FileUtils.rm_rf(Dir.glob(File.join(dir, '*')), secure: true) warn "Global cache version is obsolete and cleared." end db.set_version