From 862bfbf795b619dda9079ddfd20a2e6b1864a352 Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Tue, 7 Mar 2017 10:58:09 +1300 Subject: [PATCH] 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. --- lib/menubar/menu_gen.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/menubar/menu_gen.lua b/lib/menubar/menu_gen.lua index ed2aa142f..d1455d874 100644 --- a/lib/menubar/menu_gen.lua +++ b/lib/menubar/menu_gen.lua @@ -20,12 +20,12 @@ local menu_gen = {} local data_dir = os.getenv("XDG_DATA_HOME") if not data_dir then - data_dir = os.getenv("HOME") .. '/.local/share/' + data_dir = os.getenv("HOME") .. '/.local/share' end --- Specifies all directories where menubar should look for .desktop -- 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 -- categories in the menubar. If "use" flag is set to false then any of