diff options
Diffstat (limited to 'src/lib/eiotas_particle.c')
-rw-r--r-- | src/lib/eiotas_particle.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/eiotas_particle.c b/src/lib/eiotas_particle.c index a72d55f..6d3facc 100644 --- a/src/lib/eiotas_particle.c +++ b/src/lib/eiotas_particle.c @@ -117,6 +117,8 @@ EAPI void eiotas_particle_destinations_add(Eiotas_Particle *particle, const char static Eina_Bool add_destination(Eiotas_Particle *particle, const char *dst, int n) { + int i, c; + char *tmp; Eina_Stringshare *s; if(n==0) { @@ -132,6 +134,20 @@ static Eina_Bool add_destination(Eiotas_Particle *particle, const char *dst, int return EINA_FALSE; } + for(tmp=(char*)dst, c=0, i=0; i<n; i++, tmp++) { + if(*tmp==EIOTAS_ACTION_SEP) { + if(*(tmp-1)==EIOTAS_PATH_SEP) { + ERR("ignore destination with '%c%c' ",EIOTAS_PATH_SEP,EIOTAS_ACTION_SEP); + return EINA_FALSE; + } + c++; + } + } + if(c>1) { + ERR("ignore destination with more then 1 '%c' ",EIOTAS_ACTION_SEP); + return EINA_FALSE; + } + s = eina_stringshare_add_length(dst,n); eina_array_push(particle->dsts,s); DBG("add dst >%s<",s); |