- loadBouquet(tmp.path.c_str());
- char buf[256];
- snprintf(buf, 256, "(type == %d) FROM BOUQUET \"%s\" ORDER BY bouquet", tmp.data[0], tmp.path.c_str());
- tmp.path = buf;
+ pos = path.find("FROM BOUQUET ");
+ if (pos != std::string::npos)
+ {
+ char endchr = path[pos+13];
+ if (endchr != '"')
+ {
+ eDebug("ignore invalid bouquet '%s' (only \" are allowed)",
+ tmp.toString().c_str());
+ continue;
+ }
+ char *beg = &path[pos+14];
+ char *end = strchr(beg, endchr);
+ path.assign(beg, end - beg);
+ }
+ else
+ {
+ snprintf(buf, 256, "FROM BOUQUET \"%s\" ORDER BY bouquet", path.c_str());
+ tmp.path = buf;
+ }
+ loadBouquet(path.c_str());