summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-10-09 23:14:30 +0200
committerCarlos Garnacho <carlosg@gnome.org>2017-10-21 22:53:36 +0200
commitb95b6cdb5dfbe959040af95e44f9409a0f6119ef (patch)
tree48870e210068aea9609d57081e7ee8779841077b
parent2c55856f3ac3d5134dfdf59e25fe0e910a339330 (diff)
downloadtracker-b95b6cdb5dfbe959040af95e44f9409a0f6119ef.tar.gz
libtracker-miner: Simplify code a bit
We can steal data sooner in order to avoid unsetting the data in the early return path.
-rw-r--r--src/libtracker-miner/tracker-file-notifier.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 69758136f..1e9db6563 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -282,24 +282,22 @@ file_notifier_traverse_tree_foreach (GFile *file,
priv = notifier->priv;
current_root = priv->current_index_root->current_dir;
+ store_mtime = tracker_file_system_steal_property (priv->file_system, file,
+ quark_property_store_mtime);
+ disk_mtime = tracker_file_system_steal_property (priv->file_system, file,
+ quark_property_filesystem_mtime);
+
/* If we're crawling over a subdirectory of a root index, it's been
* already notified in the crawling op that made it processed, so avoid
* it here again.
*/
if (current_root == file &&
current_root != priv->current_index_root->root) {
- tracker_file_system_unset_property (priv->file_system, file,
- quark_property_filesystem_mtime);
- tracker_file_system_unset_property (priv->file_system, file,
- quark_property_store_mtime);
+ g_free (store_mtime);
+ g_free (disk_mtime);
return FALSE;
}
- store_mtime = tracker_file_system_steal_property (priv->file_system, file,
- quark_property_store_mtime);
- disk_mtime = tracker_file_system_steal_property (priv->file_system, file,
- quark_property_filesystem_mtime);
-
if (store_mtime && !disk_mtime) {
/* In store but not in disk, delete */
g_signal_emit (notifier, signals[FILE_DELETED], 0, file);