menubar: add trailing slash with $XDG_DATA_HOME (#1631)

The $XDG_DATA_HOME environment variable may not necessarily end in a
slash, so insert it when generating the list of all menu dirs to make
sure the directory can be found.
This commit is contained in:
Jan Larres 2017-03-07 10:58:09 +13:00 committed by Daniel Hahler
parent 399bd8543a
commit 862bfbf795

View file

@ -20,12 +20,12 @@ local menu_gen = {}
local data_dir = os.getenv("XDG_DATA_HOME") local data_dir = os.getenv("XDG_DATA_HOME")
if not data_dir then if not data_dir then
data_dir = os.getenv("HOME") .. '/.local/share/' data_dir = os.getenv("HOME") .. '/.local/share'
end end
--- Specifies all directories where menubar should look for .desktop --- Specifies all directories where menubar should look for .desktop
-- files. The search is recursive. -- files. The search is recursive.
menu_gen.all_menu_dirs = { data_dir .. 'applications/', '/usr/share/applications/', '/usr/local/share/applications/' } menu_gen.all_menu_dirs = { data_dir .. '/applications/', '/usr/share/applications/', '/usr/local/share/applications/' }
--- Specify the mapping of .desktop Categories section to the --- Specify the mapping of .desktop Categories section to the
-- categories in the menubar. If "use" flag is set to false then any of -- categories in the menubar. If "use" flag is set to false then any of