[tracker/live-config-changes: 3/6] TrackerMonitor: Only log removals if the dir was monitored.
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/live-config-changes: 3/6] TrackerMonitor: Only log removals if the dir was monitored.
- Date: Tue, 2 Mar 2010 16:29:41 +0000 (UTC)
commit 0b571e5fb7a4eba63d93d9ac105e2fc2d1dd1c34
Author: Carlos Garnacho <carlos lanedo com>
Date: Mon Mar 1 17:52:26 2010 +0100
TrackerMonitor: Only log removals if the dir was monitored.
src/libtracker-miner/tracker-monitor.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-monitor.c b/src/libtracker-miner/tracker-monitor.c
index efd7843..8971272 100644
--- a/src/libtracker-miner/tracker-monitor.c
+++ b/src/libtracker-miner/tracker-monitor.c
@@ -1537,20 +1537,23 @@ gboolean
tracker_monitor_remove (TrackerMonitor *monitor,
GFile *file)
{
- gchar *path;
gboolean removed;
g_return_val_if_fail (TRACKER_IS_MONITOR (monitor), FALSE);
g_return_val_if_fail (G_IS_FILE (file), FALSE);
removed = g_hash_table_remove (monitor->private->monitors, file);
- path = g_file_get_path (file);
- g_debug ("Removed monitor for path:'%s', total monitors:%d",
- path,
- g_hash_table_size (monitor->private->monitors));
+ if (removed) {
+ gchar *path;
- g_free (path);
+ path = g_file_get_path (file);
+ g_debug ("Removed monitor for path:'%s', total monitors:%d",
+ path,
+ g_hash_table_size (monitor->private->monitors));
+
+ g_free (path);
+ }
return removed;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]