Browse Source

Don't crawl through the same xdg_data_dirs twice

pull/1/merge
gapan 13 years ago
parent
commit
5a247e6553
  1. 8
      src/xdgmenumaker

8
src/xdgmenumaker

@ -192,9 +192,15 @@ def sortedcategories(applist):
return categories return categories
def desktopfilelist(): 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 = [] filelist = []
for d in dirs: for d in dirs:
print d
xdgdir = d+'/applications' xdgdir = d+'/applications'
if os.path.isdir(xdgdir): if os.path.isdir(xdgdir):
for i in os.listdir(xdgdir): for i in os.listdir(xdgdir):

Loading…
Cancel
Save