Accept and process relative/incomplete paths with the dir: directive (dont anchor path phrase is path does not start with /)

This commit is contained in:
Jean-Francois Dockes 2012-02-24 19:25:55 +01:00
parent 3fd65ea4cf
commit 6cdf9ae12b

View File

@ -291,7 +291,8 @@ bool SearchData::toNativeQuery(Rcl::Db &db, void *d)
vector<string> vpath;
stringToTokens(m_topdir, vpath, "/");
vector<string> pvpath;
pvpath.push_back(pathelt_prefix);
if (m_topdir[0] == '/')
pvpath.push_back(pathelt_prefix);
for (vector<string>::const_iterator it = vpath.begin();
it != vpath.end(); it++){
pvpath.push_back(pathelt_prefix + *it);