forked from enlightenment/enlightenment
Fix : Check that the file has a protocol.
Reviewers: devilhorns Subscribers: raster, cedric, zmike Tags: #enlightenment-git Differential Revision: https://phab.enlightenment.org/D10410
This commit is contained in:
parent
765d8e1d3d
commit
19395ae1fe
|
@ -480,6 +480,20 @@ static const Ecore_Getopt options = {
|
|||
}
|
||||
};
|
||||
|
||||
static Eina_Bool
|
||||
_is_protocol(const char *path)
|
||||
{
|
||||
Eina_Bool nonlocal = EINA_FALSE;
|
||||
const char *p = path;
|
||||
while (!nonlocal && *p && *p != '/')
|
||||
{
|
||||
nonlocal = (*p == ':');
|
||||
p++;
|
||||
}
|
||||
return nonlocal;
|
||||
}
|
||||
|
||||
|
||||
E_API int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
|
@ -540,7 +554,7 @@ main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (strstr(argv[args], ":"))
|
||||
else if (_is_protocol(argv[args]))
|
||||
cmds = protocol_open(argv[args]);
|
||||
else
|
||||
cmds = local_open(argv[args]);
|
||||
|
|
Loading…
Reference in New Issue