[tracker/tracker-0.10] tracker-writeback: Don't warn in case of unsupported format for writeback



commit 062342d60e23c72bec0ffb27d8fc15e4fbfb0eb8
Author: Philip Van Hoof <philip codeminded be>
Date:   Tue Oct 11 15:33:46 2011 +0200

    tracker-writeback: Don't warn in case of unsupported format for writeback
    
    Fixes NB#285979.

 src/libtracker-miner/tracker-miner-fs.c   |    6 +++++-
 src/tracker-writeback/tracker-writeback.c |    4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 983b1af..b8fe5f0 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -4980,7 +4980,11 @@ tracker_miner_fs_writeback_notify (TrackerMinerFS *fs,
 		            G_OBJECT_TYPE_NAME (fs), uri);
 		g_free (uri);
 	} else if (error) {
-		g_warning ("Writeback operation failed: %s", error->message);
+
+		if (!(error->domain == TRACKER_DBUS_ERROR &&
+		      error->code == TRACKER_DBUS_ERROR_UNSUPPORTED)) {
+			g_warning ("Writeback operation failed: %s", error->message);
+		}
 
 		/* We don't expect any further monitor
 		 * events on the original file.
diff --git a/src/tracker-writeback/tracker-writeback.c b/src/tracker-writeback/tracker-writeback.c
index b64593f..5eac0d3 100644
--- a/src/tracker-writeback/tracker-writeback.c
+++ b/src/tracker-writeback/tracker-writeback.c
@@ -573,8 +573,8 @@ handle_method_call_perform_writeback (TrackerController     *controller,
 
 	if (!handled) {
 		g_dbus_method_invocation_return_error (invocation,
-		                                       G_IO_ERROR,
-		                                       G_IO_ERROR_FAILED,
+		                                       TRACKER_DBUS_ERROR,
+		                                       TRACKER_DBUS_ERROR_UNSUPPORTED,
 		                                       "No module for rdf types");
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]