From 1574eb459b84c6a7bda8daef29e44c1ab719370a Mon Sep 17 00:00:00 2001
From: Jean-Francois Dockes
Date: Sun, 31 Mar 2013 08:36:11 +0200
Subject: [PATCH] use st_ctime always to detect file changes
---
src/index/fsindexer.cpp | 8 +++++---
website/release-1.19.html | 10 ++++++++++
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/index/fsindexer.cpp b/src/index/fsindexer.cpp
index 8234dd7d..9df1ce78 100644
--- a/src/index/fsindexer.cpp
+++ b/src/index/fsindexer.cpp
@@ -48,12 +48,14 @@
// When using extended attributes, we have to use the ctime, because
-// this is all that gets set when the attributes are modified. This
-// is quite an expensive price to pay...
+// this is all that gets set when the attributes are modified.
+// 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
#define RCL_STTIME st_ctime
#else
-#define RCL_STTIME st_mtime
+#define RCL_STTIME st_ctime
#endif // RCL_USE_XATTR
using namespace std;
diff --git a/website/release-1.19.html b/website/release-1.19.html
index 36dbe24c..4cd3f368 100644
--- a/website/release-1.19.html
+++ b/website/release-1.19.html
@@ -54,6 +54,11 @@
that no debris from older releases remain (e.g.: old stemming
files which are not used any more).
+ 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.
+
Viewer exceptions:
There is a new list of mime types that should be opened with
the locally configured application even when Use
@@ -85,6 +90,11 @@
inside the simple search string, which was often more confusing
and ennoying than useful.
+ 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).
+
The software can now be built so that indexing is runs with
multiple threads. This can be a major performance boost for
people with multiprocessor machines and big indexes. It is not