|
a/src/index/fsfetcher.cpp |
|
b/src/index/fsfetcher.cpp |
|
... |
|
... |
31 |
|
31 |
|
32 |
static bool urltopath(RclConfig* cnf,
|
32 |
static bool urltopath(RclConfig* cnf,
|
33 |
const Rcl::Doc& idoc, string& fn, struct stat& st)
|
33 |
const Rcl::Doc& idoc, string& fn, struct stat& st)
|
34 |
{
|
34 |
{
|
35 |
// The url has to be like file://
|
35 |
// The url has to be like file://
|
36 |
if (idoc.url.find(cstr_fileu) != 0) {
|
36 |
fn = fileurltolocalpath(idoc.url);
|
|
|
37 |
if (fn.empty()) {
|
37 |
LOGERR(("FSDocFetcher::fetch/sig: non fs url: [%s]\n",
|
38 |
LOGERR(("FSDocFetcher::fetch/sig: non fs url: [%s]\n",
|
38 |
idoc.url.c_str()));
|
39 |
idoc.url.c_str()));
|
39 |
return false;
|
40 |
return false;
|
40 |
}
|
41 |
}
|
41 |
fn = idoc.url.substr(7, string::npos);
|
|
|
42 |
cnf->setKeyDir(path_getfather(fn));
|
42 |
cnf->setKeyDir(path_getfather(fn));
|
43 |
bool follow = false;
|
43 |
bool follow = false;
|
44 |
cnf->getConfParam("followLinks", &follow);
|
44 |
cnf->getConfParam("followLinks", &follow);
|
45 |
|
45 |
|
46 |
if ((follow ? stat(fn.c_str(), &st) : lstat(fn.c_str(), &st))< 0) {
|
46 |
if ((follow ? stat(fn.c_str(), &st) : lstat(fn.c_str(), &st))< 0) {
|