diff options
Diffstat (limited to 'otfl-font-nms.lua')
-rw-r--r-- | otfl-font-nms.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua index 5333c2e..aecdc0b 100644 --- a/otfl-font-nms.lua +++ b/otfl-font-nms.lua @@ -696,8 +696,12 @@ local function update_names(fontnames, force) end local function save_names(fontnames) - local savepath = names.path.localdir .. names.path.basename - io.savedata(savepath, table.serialize(fontnames, true)) + local savepath = names.path.localdir + if not lfs.isdir(savepath) then + dir.mkdirs(savepath) + end + io.savedata(savepath .. names.path.basename, + table.serialize(fontnames, true)) end names.scan = scan_dir |