summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-03-24 14:28:37 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-03-24 14:59:11 -0500
commit67e07e5d2d572957fa8a16c662b22baa39d7b643 (patch)
tree152ce4393b46f3f66b1f37cfdf66635a5a50c693
parentacf4c35fd62116bf1f6e34e9d3949a09ede7f6ad (diff)
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
-rw-r--r--src/lib/efreet/efreet_utils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/efreet/efreet_utils.c b/src/lib/efreet/efreet_utils.c
index ae3ab17e5a..e1cafaaf89 100644
--- a/src/lib/efreet/efreet_utils.c
+++ b/src/lib/efreet/efreet_utils.c
@@ -279,7 +279,12 @@ efreet_util_desktop_exec_find(const char *exec)
279 ret = efreet_desktop_get(array->array[j]); 279 ret = efreet_desktop_get(array->array[j]);
280 if (ret) 280 if (ret)
281 { 281 {
282 if (!bestret) bestret = ret; 282 if (!bestret)
283 {
284 bestret = ret;
285 if (bestret->exec && !strcmp(bestret->exec, exec))
286 goto done;
287 }
283 else 288 else
284 { 289 {
285 if (ret->exec) 290 if (ret->exec)