Switch to unified view

a/src/index/indexer.cpp b/src/index/indexer.cpp
...
...
50
50
51
#ifdef RCL_USE_ASPELL
51
#ifdef RCL_USE_ASPELL
52
#include "rclaspell.h"
52
#include "rclaspell.h"
53
#endif
53
#endif
54
54
55
// When using extended attributes, we have to use the ctime. 
56
// This is quite an expensive price to pay...
57
#ifdef RCL_USE_XATTR
58
#define RCL_STTIME st_ctime
59
#else
60
#define RCL_STTIME st_mtime
61
#endif // RCL_USE_XATTR
62
55
#ifndef NO_NAMESPACES
63
#ifndef NO_NAMESPACES
56
using namespace std;
64
using namespace std;
57
#endif /* NO_NAMESPACES */
65
#endif /* NO_NAMESPACES */
58
66
59
#ifndef deleteZ
67
#ifndef deleteZ
...
...
389
    // identification means that, if usesystemfilecommand is switched
397
    // identification means that, if usesystemfilecommand is switched
390
    // from on to off it may happen that some files which are now
398
    // from on to off it may happen that some files which are now
391
    // without mime type will not be purged from the db, resulting
399
    // without mime type will not be purged from the db, resulting
392
    // in possible 'cannot intern file' messages at query time...
400
    // in possible 'cannot intern file' messages at query time...
393
    char cbuf[100]; 
401
    char cbuf[100]; 
394
    // Document signature. This is based on mtime and size and used
402
    // Document signature. This is based on m/ctime and size and used
395
    // for the uptodate check (the value computed here is checked
403
    // for the uptodate check (the value computed here is checked
396
    // against the stored one). Changing the computation forces a full
404
    // against the stored one). Changing the computation forces a full
397
    // reindex of course.
405
    // reindex of course.
398
    sprintf(cbuf, "%ld%ld", (long)stp->st_size, (long)stp->st_mtime);
406
    sprintf(cbuf, "%ld%ld", (long)stp->st_size, (long)stp->RCL_STTIME);
399
    string sig = cbuf;
407
    string sig = cbuf;
400
    string udi;
408
    string udi;
401
    make_udi(fn, "", udi);
409
    make_udi(fn, "", udi);
402
    if (!m_db.needUpdate(udi, sig)) {
410
    if (!m_db.needUpdate(udi, sig)) {
403
    LOGDEB(("processone: up to date: %s\n", fn.c_str()));
411
    LOGDEB(("processone: up to date: %s\n", fn.c_str()));
...
...
486
    sprintf(cbuf, "%ld", (long)stp->st_size);
494
    sprintf(cbuf, "%ld", (long)stp->st_size);
487
    doc.fbytes = cbuf;
495
    doc.fbytes = cbuf;
488
    // Document signature for up to date checks: concatenate mtime and 
496
    // Document signature for up to date checks: concatenate mtime and 
489
    // size. Note: looking for changes only, no need to parseback so no
497
    // size. Note: looking for changes only, no need to parseback so no
490
    // need for reversible formatting
498
    // need for reversible formatting
491
    sprintf(cbuf, "%ld%ld", (long)stp->st_size, (long)stp->st_mtime);
499
    sprintf(cbuf, "%ld%ld", (long)stp->st_size, (long)stp->RCL_STTIME);
492
    doc.sig = cbuf;
500
    doc.sig = cbuf;
493
    // If there was an error, ensure indexing will be
501
    // If there was an error, ensure indexing will be
494
    // retried. This is for the once missing, later installed
502
    // retried. This is for the once missing, later installed
495
    // filter case. It can make indexing much slower (if there are
503
    // filter case. It can make indexing much slower (if there are
496
    // myriads of such files, the ext script is executed for them
504
    // myriads of such files, the ext script is executed for them
...
...
531
539
532
    char cbuf[100]; 
540
    char cbuf[100]; 
533
    sprintf(cbuf, "%ld", (long)stp->st_size);
541
    sprintf(cbuf, "%ld", (long)stp->st_size);
534
    fileDoc.fbytes = cbuf;
542
    fileDoc.fbytes = cbuf;
535
    // Document signature for up to date checks.
543
    // Document signature for up to date checks.
536
    sprintf(cbuf, "%ld%ld", (long)stp->st_size, (long)stp->st_mtime);
544
    sprintf(cbuf, "%ld%ld", (long)stp->st_size, (long)stp->RCL_STTIME);
537
    fileDoc.sig = cbuf;
545
    fileDoc.sig = cbuf;
538
    if (!m_db.addOrUpdate(parent_udi, "", fileDoc)) 
546
    if (!m_db.addOrUpdate(parent_udi, "", fileDoc)) 
539
        return FsTreeWalker::FtwError;
547
        return FsTreeWalker::FtwError;
540
    }
548
    }
541
549