use st_ctime always to detect file changes

This commit is contained in:
Jean-Francois Dockes 2013-03-31 08:36:11 +02:00
parent ed91113eab
commit 1574eb459b
2 changed files with 15 additions and 3 deletions

View file

@ -48,12 +48,14 @@
// When using extended attributes, we have to use the ctime, because // When using extended attributes, we have to use the ctime, because
// this is all that gets set when the attributes are modified. This // this is all that gets set when the attributes are modified.
// is quite an expensive price to pay... // As of 1.19 we use ctime in all cases as this allows to detect a
// file renamed into an existing file (e.g. when shifting logs or
// other archives).
#ifdef RCL_USE_XATTR #ifdef RCL_USE_XATTR
#define RCL_STTIME st_ctime #define RCL_STTIME st_ctime
#else #else
#define RCL_STTIME st_mtime #define RCL_STTIME st_ctime
#endif // RCL_USE_XATTR #endif // RCL_USE_XATTR
using namespace std; using namespace std;

View file

@ -54,6 +54,11 @@
that no debris from older releases remain (e.g.: old stemming that no debris from older releases remain (e.g.: old stemming
files which are not used any more).</p> files which are not used any more).</p>
<p>Installing 1.19 over an 1.18 index will force a lot of
reindexing anyway because we switched from using st_ctime instead
of st_mtime to detect file modifications, meaning that all files
which were modified since created will be updated.</p>
<p><span class="important">Viewer exceptions</span>: <p><span class="important">Viewer exceptions</span>:
There is a new list of mime types that should be opened with There is a new list of mime types that should be opened with
the locally configured application even when <em>Use the locally configured application even when <em>Use
@ -85,6 +90,11 @@
inside the simple search string, which was often more confusing inside the simple search string, which was often more confusing
and ennoying than useful.</li> and ennoying than useful.</li>
<li>Extended file attributes are now indexed by default. As a
side effect, recoll now uses st_ctime, not st_mtime to detect
file changes. This means that installing 1.19 will reindex
many files (all those that were modified since created).</li>
<li>The software can now be built so that indexing is runs with <li>The software can now be built so that indexing is runs with
multiple threads. This can be a major performance boost for multiple threads. This can be a major performance boost for
people with multiprocessor machines and big indexes. It is not people with multiprocessor machines and big indexes. It is not