forked from enlightenment/enlightenment
from gustavo - efm cmdline grok uri's but needs efreet linking.
SVN revision: 82712
This commit is contained in:
parent
374580215d
commit
b6a5ad1a40
|
@ -468,6 +468,7 @@ PKG_CHECK_MODULES(E_FM_CMDLINE, [
|
||||||
ecore >= ${efl_version}
|
ecore >= ${efl_version}
|
||||||
ecore-file >= ${efl_version}
|
ecore-file >= ${efl_version}
|
||||||
edbus2 >= ${efl_version}
|
edbus2 >= ${efl_version}
|
||||||
|
efreet >= ${efl_version}
|
||||||
])
|
])
|
||||||
|
|
||||||
PKG_CHECK_MODULES(E_FM_OP, [
|
PKG_CHECK_MODULES(E_FM_OP, [
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#include "e.h"
|
#include "e.h"
|
||||||
|
#include <Efreet.h>
|
||||||
|
|
||||||
static EDBus_Connection *conn = NULL;
|
static EDBus_Connection *conn = NULL;
|
||||||
static int retval = EXIT_SUCCESS;
|
static int retval = EXIT_SUCCESS;
|
||||||
|
@ -39,6 +40,21 @@ fm_open(const char *path)
|
||||||
|
|
||||||
if (path[0] == '/')
|
if (path[0] == '/')
|
||||||
p = strdup(path);
|
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
|
else
|
||||||
{
|
{
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
Loading…
Reference in New Issue