zmike pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2f5e2de8c40bc670be7ad0d79346507fdb8ba8a4
commit 2f5e2de8c40bc670be7ad0d79346507fdb8ba8a4 Author: thierry1970 <[email protected]> Date: Mon Oct 28 09:07:12 2019 -0400 efreet : Check that the file has a protocol in efreet_desktop_command_file_process() if a path has a '/' character in it before the ':' character then it should be treated as a local file which contains a ':' character in its name Reviewers: devilhorns, zmike Reviewed By: zmike Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10409 --- src/lib/efreet/efreet_desktop_command.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/lib/efreet/efreet_desktop_command.c b/src/lib/efreet/efreet_desktop_command.c index 26ac9aca2f..6c388caa3f 100644 --- a/src/lib/efreet/efreet_desktop_command.c +++ b/src/lib/efreet/efreet_desktop_command.c @@ -605,6 +605,19 @@ efreet_desktop_command_append_icon(char *dest, int *size, int *len, return dest; } +static Eina_Bool +_is_protocol(const char *path) +{ + Eina_Bool nonlocal = EINA_FALSE; + char *p = (char*)path; + while (!nonlocal && *p && *p != '/') + { + nonlocal = (*p == ':'); + p++; + } + return nonlocal; +} + /** * @param command the Efreet_Desktop_Comand that this file is for * @param file the filname as either an absolute path, relative path, or URI @@ -630,7 +643,7 @@ efreet_desktop_command_file_process(Efreet_Desktop_Command *command, const char return NULL; } } - else if (strstr(file, ":")) + else if (_is_protocol(file)) { uri = file; base = ecore_file_file_get(file); --
