[tracker/forced-mtime-check-per-directory: 2/5] tracker-miner-fs: force mtime checks on inconsistent mounts
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/forced-mtime-check-per-directory: 2/5] tracker-miner-fs: force mtime checks on inconsistent mounts
- Date: Thu, 8 Sep 2011 14:59:32 +0000 (UTC)
commit 1c886c74db0d25cddf75ce8afd35cefa12a8d680
Author: Aleksander Morgado <aleksander lanedo com>
Date: Tue Sep 6 17:52:10 2011 +0200
tracker-miner-fs: force mtime checks on inconsistent mounts
If a mount is reported to be unmounted in the store, but was found mounted when
tracker-miner-fs started, force a mtime check in the mount.
src/miners/fs/tracker-miner-files.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 25b360d..90b6ae5 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -1029,6 +1029,16 @@ init_mount_points (TrackerMinerFiles *miner_files)
TRACKER_STORAGE_TYPE_IS_OPTICAL (type),
accumulator);
+ if (mount_point) {
+ GFile *file;
+
+ /* Add the current mount point as reported to have incorrect
+ * state. We will force mtime checks on this mount points,
+ * even if no-mtime-check-needed was set. */
+ file = g_file_new_for_path (mount_point);
+ tracker_miner_fs_force_mtime_checking (TRACKER_MINER_FS (miner), file);
+ g_object_unref (file);
+ }
}
} else if (!(state & VOLUME_MOUNTED) &&
(state & VOLUME_MOUNTED_IN_STORE)) {
@@ -1042,6 +1052,8 @@ init_mount_points (TrackerMinerFiles *miner_files)
NULL,
FALSE,
accumulator);
+ /* There's no need to force mtime check in these inconsistent
+ * mount points, as they are not mounted right now. */
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]