g.fs.get_cache_dir: Ensure the dir exists
This makes get_cache_dir() try to ensure the cache directory that it returns exists. Should-fix: https://github.com/awesomeWM/awesome/issues/1663 Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
4bbedebea4
commit
48c15e4dfb
|
@ -103,7 +103,9 @@ end
|
|||
--- Get the path to a directory that should be used for caching data.
|
||||
-- @return A string with the requested path with a slash at the end.
|
||||
function filesystem.get_cache_dir()
|
||||
return filesystem.get_xdg_cache_home() .. "awesome/"
|
||||
local result = filesystem.get_xdg_cache_home() .. "awesome/"
|
||||
filesystem.mkdir(result)
|
||||
return result
|
||||
end
|
||||
|
||||
--- Get the path to the directory where themes are installed.
|
||||
|
|
Loading…
Reference in New Issue