[tracker-miners/wip/carlosg/shuffle-libtracker-miner: 28/116] libtracker-miner: Remove ifdef around useful feature
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/shuffle-libtracker-miner: 28/116] libtracker-miner: Remove ifdef around useful feature
- Date: Thu, 12 Dec 2019 10:23:15 +0000 (UTC)
commit 56c1f4023ed25cf325f75294b1e82211c2977d5a
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Oct 18 23:21:48 2017 +0200
libtracker-miner: Remove ifdef around useful feature
The mentioned bug got fixed ~6y ago, but the changes making
use of the feature for some reason got stuck under a define
that's never defined.
This is an useful feature, so rely on it without further ado.
src/libtracker-miner/tracker-monitor.c | 27 ++++-----------------------
1 file changed, 4 insertions(+), 23 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-monitor.c b/src/libtracker-miner/tracker-monitor.c
index 9a709d240..b3f78988c 100644
--- a/src/libtracker-miner/tracker-monitor.c
+++ b/src/libtracker-miner/tracker-monitor.c
@@ -34,21 +34,6 @@
#define TRACKER_MONITOR_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TRACKER_TYPE_MONITOR,
TrackerMonitorPrivate))
-/* If this is enabled, we are assuming that GIO is fixed so that after a CREATED
- * event emitted after a move operation from a non-monitored path to a monitored
- * one, a CHANGES_DONE_HINT is also emitted. This allows us to NOT send the
- * CREATED event to upper layers until the file has been fully closed.
- *
- * See https://bugzilla.gnome.org/show_bug.cgi?id=640077 and
- * https://projects.maemo.org/bugzilla/show_bug.cgi?id=219982
- * When the upstream bugfix is integrated in GLib/GIO, we will be able to
- * depend on an specific glib version. Until then, disable this and only
- * enable in distros which have that patched glib.
- **/
-#ifdef GIO_ALWAYS_SENDS_CHANGES_DONE_HINT_AFTER_CREATED
-#warning Assuming GLib/GIO always sends CHANGES_DONE_HINT after CREATED...
-#endif /* GIO_ALWAYS_SENDS_CHANGES_DONE_HINT_AFTER_CREATED */
-
/* The life time of an item in the cache */
#define CACHE_LIFETIME_SECONDS 1
@@ -833,13 +818,11 @@ monitor_event_file_created (TrackerMonitor *monitor,
FALSE,
G_FILE_MONITOR_EVENT_CREATED);
- /* If we know that there always must be a CHANGES_DONE_HINT
- * emitted after a CREATED on a file event, set the event
- * as non-expirable. Will be set expirable when CHANGES_DONE_HINT
- * is actually received */
-#ifdef GIO_ALWAYS_SENDS_CHANGES_DONE_HINT_AFTER_CREATED
+ /* There will be a CHANGES_DONE_HINT emitted after the CREATED
+ * event, so we set it as non-expirable. It will be set as
+ * expirable when the CHANGES_DONE_HINT is received.
+ */
new_event->expirable = FALSE;
-#endif /* GIO_ALWAYS_SENDS_CHANGES_DONE_HINT_AFTER_CREATED */
g_hash_table_replace (monitor->priv->pre_update,
g_object_ref (file),
@@ -866,12 +849,10 @@ monitor_event_file_changed (TrackerMonitor *monitor,
*/
g_hash_table_remove (monitor->priv->pre_update, file);
} else if (previous_update_event_data->event_type == G_FILE_MONITOR_EVENT_CREATED) {
-#ifdef GIO_ALWAYS_SENDS_CHANGES_DONE_HINT_AFTER_CREATED
/* If we got a CHANGED event before the CREATED was expired,
* set the CREATED as not expirable, as we expect a CHANGES_DONE_HINT
* afterwards. */
previous_update_event_data->expirable = FALSE;
-#endif /* GIO_ALWAYS_SENDS_CHANGES_DONE_HINT_AFTER_CREATED */
}
}
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]