from gustavo - efm cmdline grok uri's but needs efreet linking.

SVN revision: 82712
This commit is contained in:
Carsten Haitzler 2013-01-13 05:36:22 +00:00
parent 374580215d
commit b6a5ad1a40
2 changed files with 17 additions and 0 deletions

View File

@ -468,6 +468,7 @@ PKG_CHECK_MODULES(E_FM_CMDLINE, [
ecore >= ${efl_version}
ecore-file >= ${efl_version}
edbus2 >= ${efl_version}
efreet >= ${efl_version}
])
PKG_CHECK_MODULES(E_FM_OP, [

View File

@ -3,6 +3,7 @@
# endif
#include "e.h"
#include <Efreet.h>
static EDBus_Connection *conn = NULL;
static int retval = EXIT_SUCCESS;
@ -39,6 +40,21 @@ fm_open(const char *path)
if (path[0] == '/')
p = strdup(path);
else if (strstr(path, "://"))
{
Efreet_Uri *uri = efreet_uri_decode(path);
if ((!uri) || (!uri->protocol) || (strcmp(uri->protocol, "file") != 0))
{
ERR("Invalid URI '%s'", path);
ecore_idler_add(fm_error_quit_last, NULL);
if (uri)
efreet_uri_free(uri);
return;
}
p = strdup(uri->path);
efreet_uri_free(uri);
}
else
{
char buf[PATH_MAX];