Switch to unified view

a/src/internfile/internfile.cpp b/src/internfile/internfile.cpp
...
...
439
        LOGERR(("FileInterner:: unknown backend: [%s]\n", backend.c_str()));
439
        LOGERR(("FileInterner:: unknown backend: [%s]\n", backend.c_str()));
440
        return;
440
        return;
441
    }
441
    }
442
}
442
}
443
443
444
#include "fsindexer.h"
445
bool FileInterner::makesig(const Rcl::Doc& idoc, string& sig)
446
{
447
    if (idoc.url.empty()) {
448
        LOGERR(("FileInterner::makesig:: no url!\n"));
449
        return false;
450
    }
451
    string backend;
452
    idoc.getmeta(Rcl::Doc::keybcknd, &backend);
453
    
454
    if (backend.empty() || !backend.compare("FS")) {
455
        if (idoc.url.find(cstr_fileu) != 0) {
456
            LOGERR(("FileInterner: FS backend and non fs url: [%s]\n",
457
                    idoc.url.c_str()));
458
            return false;
459
        }
460
        string fn = idoc.url.substr(7, string::npos);
461
        struct stat st;
462
        if (stat(fn.c_str(), &st) < 0) {
463
            LOGERR(("FileInterner:: cannot access document file: [%s]\n",
464
                    fn.c_str()));
465
            return false;
466
        }
467
  FsIndexer::makesig(&st, sig);
468
  return true;
469
    } else if (!backend.compare("BGL")) {
470
  // Bgl sigs are empty
471
  sig.clear();
472
  return true;
473
    } else {
474
        LOGERR(("FileInterner:: unknown backend: [%s]\n", backend.c_str()));
475
        return false;
476
    }
477
    return false;
478
}
479
444
FileInterner::~FileInterner()
480
FileInterner::~FileInterner()
445
{
481
{
446
    tmpcleanup();
482
    tmpcleanup();
447
    for (vector<Dijon::Filter*>::iterator it = m_handlers.begin();
483
    for (vector<Dijon::Filter*>::iterator it = m_handlers.begin();
448
     it != m_handlers.end(); it++) {
484
     it != m_handlers.end(); it++) {