Fontlist: Move cache file in a subdirectory, so as not to mess with

Cache's state tracking

Re #7510

Legacy cache has to be deleted in Cache,
*before* the first getDiskCache call.

Reword the "Clear caches" Dev menu entry & callback:
We now have an actual "Restart" action (on most, if not all, platforms).
And we clear the whole cache folder, which may host other things (e.g.,
fontlist)
This commit is contained in:
NiLuJe
2021-04-09 18:30:51 +02:00
parent 5b996c8ab7
commit a62561e81e
3 changed files with 12 additions and 6 deletions

View File

@@ -39,6 +39,9 @@ end
local cache_path = DataStorage:getDataDir() .. "/cache/"
-- NOTE: Before 2021.04, fontlist used to squat our folder, needlessly polluting our state tracking.
os.remove(cache_path .. "/fontinfo.dat")
--[[
-- return a snapshot of disk cached items for subsequent check
--]]