Fix empty names 'Name=' in *.desktop files.

For undefined reason
~/.local/share/applications/userapp-avidemux_qt4-GR53LX.desktop
was created with 'Name='. This commit should resolve the problem.
This commit is contained in:
Kolan Sh 2014-09-19 07:38:18 +04:00
parent b12ec25c8e
commit 22477f02fd
1 changed files with 3 additions and 0 deletions

View File

@ -191,6 +191,9 @@ function parse_desktop_file(arg)
end end
if program.Exec then if program.Exec then
if program.Name == nil then
program.Name = ""
end
local cmdline = program.Exec:gsub('%%c', program.Name) local cmdline = program.Exec:gsub('%%c', program.Name)
cmdline = cmdline:gsub('%%[fmuFMU]', '') cmdline = cmdline:gsub('%%[fmuFMU]', '')
cmdline = cmdline:gsub('%%k', program.file) cmdline = cmdline:gsub('%%k', program.file)