[tracker/live-config-changes: 3/5] TrackerMonitor: Only log removals if the dir was monitored.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/live-config-changes: 3/5] TrackerMonitor: Only log removals if the dir was monitored.
- Date: Mon, 1 Mar 2010 17:11:10 +0000 (UTC)
commit be9419574f0fd75ad9e4633802ba2ce75f6b3645
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]