efreet: Don't prefer the second perfect over the first in desktop_exec_find()

We test a second match for a perfect match, then stop all further processing,
but we never test the first match. This leads to a situation where a system
wide .desktop file is given precedence over a local override.

Instead, check the first match too.

 #test-e
This commit is contained in:
Derek Foreman 2017-03-24 14:28:37 -05:00
parent acf4c35fd6
commit 67e07e5d2d
1 changed files with 6 additions and 1 deletions

View File

@ -279,7 +279,12 @@ efreet_util_desktop_exec_find(const char *exec)
ret = efreet_desktop_get(array->array[j]);
if (ret)
{
if (!bestret) bestret = ret;
if (!bestret)
{
bestret = ret;
if (bestret->exec && !strcmp(bestret->exec, exec))
goto done;
}
else
{
if (ret->exec)