diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2013-04-26 18:48:32 +0200 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-04-26 18:48:32 +0200 |
commit | 7c283ff361da9c8477e4f1af3798d54371f81100 (patch) | |
tree | 59e22cf5dbeda159e3a51d5c41ba61d1cf13d447 /luaotfload-database.lua | |
parent | 05e014ba69d57c18c460e0d0e12a7802d9c58225 (diff) | |
download | luaotfload-7c283ff361da9c8477e4f1af3798d54371f81100.tar.gz |
have flush_cache operate on names.data
Diffstat (limited to 'luaotfload-database.lua')
-rw-r--r-- | luaotfload-database.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/luaotfload-database.lua b/luaotfload-database.lua index 7c6e657..4980766 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -1288,11 +1288,11 @@ local function scan_os_fonts(fontnames, newfontnames) return n_scanned, n_new end -flush_cache = function (fontnames) - if not fontnames then fontnames = load_names() end - fontnames.request_cache = { } +flush_cache = function () + if not names.data then names.data = load_names() end + names.data.request_cache = { } collectgarbage"collect" - return true, fontnames + return true, names.data end --- dbobj -> bool -> dbobj @@ -1352,8 +1352,8 @@ save_names = function (fontnames) if fileiswritable(path) then local luaname, lucname = make_name(names.path.path) if luaname then - --tabletofile(luaname, data, true, { reduce=true }) - table.tofile(luaname, fontnames, true) + --tabletofile(luaname, fontnames, true, { reduce=true }) + tabletofile(luaname, fontnames, true) if lucname and type(caches.compile) == "function" then os.remove(lucname) caches.compile(fontnames, luaname, lucname) |