summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-10-09 23:14:30 +0200
committerCarlos Garnacho <carlosg@gnome.org>2017-11-14 22:45:26 +0100
commitf6b47315c42675a43239b1dc13704798a44d6993 (patch)
tree915e66bc26f8cd44988587516953981cf39197dd
parent76805bfdd9c0ef5d30d89746f6e5a053eaa557f2 (diff)
downloadtracker-f6b47315c42675a43239b1dc13704798a44d6993.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);