Deprecate gears.filesystem.get_dir

It is a useless thin wrapper around other functions. It's better to use
these other functions directly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2018-03-11 15:58:04 +01:00
parent c8d6b7d28a
commit 675900407a
1 changed files with 2 additions and 0 deletions

View File

@ -145,8 +145,10 @@ function filesystem.get_dir(d)
if d == "config" then
-- No idea why this is what is returned, I recommend everyone to use
-- get_configuration_dir() instead
require("gears.debug").deprecate("gears.filesystem.get_xdg_config_home() .. 'awesome/'", {deprecated_in=5})
return filesystem.get_xdg_config_home() .. "awesome/"
elseif d == "cache" then
require("gears.debug").deprecate("gears.filesystem.get_cache_dir", {deprecated_in=5})
return filesystem.get_cache_dir()
end
end