diff --git a/src/xdgmenumaker b/src/xdgmenumaker index 6098a01..e0a1715 100755 --- a/src/xdgmenumaker +++ b/src/xdgmenumaker @@ -192,9 +192,15 @@ def sortedcategories(applist): return categories def desktopfilelist(): - dirs = bd.xdg_data_dirs + dirs = [] + # some directories are mentioned twice in bd.xdg_data_dirs, once + # with and once without a trailing / + for i in bd.xdg_data_dirs: + dirs.append(i.rstrip('/')) + dirs = set(dirs) filelist = [] for d in dirs: + print d xdgdir = d+'/applications' if os.path.isdir(xdgdir): for i in os.listdir(xdgdir):