Permalink
Browse files

menubar: handle nil Name in .desktop files

  • Loading branch information...
roysc-zz authored and psychon committed Jan 20, 2015
1 parent f128b31 commit dd40e7a021dfdc3f69bf029321b7eb5fd32ac7a0
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/menubar/utils.lua.in
View
@@ -175,6 +175,9 @@ function utils.parse(file)
if program.Exec then
-- Substitute Exec special codes as specified in
-- http://standards.freedesktop.org/desktop-entry-spec/1.1/ar01s06.html
if program.Name == nil then
program.Name = '['.. file:match("([^/]+)%.desktop$") ..']'
end
local cmdline = program.Exec:gsub('%%c', program.Name)
cmdline = cmdline:gsub('%%[fuFU]', '')
cmdline = cmdline:gsub('%%k', program.file)

0 comments on commit dd40e7a

Please sign in to comment.