[tracker] tracker-extract: Do not pass lesser errors as processing errors



commit d8c1fb061539218d3255d5aa04227f9906963cf7
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Mar 17 19:48:45 2015 +0100

    tracker-extract: Do not pass lesser errors as processing errors
    
    The errors sent back to the decorator are meant to be sort of critical/
    disrupting, things that fall upon the normal mode of operation that
    tracker-extract should be prepared for (eg. files we don't have
    extractors for) shouldn't be issued as criticals.

 src/tracker-extract/tracker-extract-decorator.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-decorator.c b/src/tracker-extract/tracker-extract-decorator.c
index fb33b14..80bee9c 100644
--- a/src/tracker-extract/tracker-extract-decorator.c
+++ b/src/tracker-extract/tracker-extract-decorator.c
@@ -216,7 +216,13 @@ get_metadata_cb (TrackerExtract *extract,
                GError *error = NULL;
 
                g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), &error);
-               g_task_return_error (task, error);
+
+               if (!error || error->domain == TRACKER_EXTRACT_ERROR) {
+                       g_message ("Extraction failed: %s\n", error->message);
+                       g_task_return_boolean (task, FALSE);
+               } else {
+                       g_task_return_error (task, error);
+               }
        } else {
                decorator_save_info (g_task_get_task_data (task),
                                     TRACKER_EXTRACT_DECORATOR (data->decorator),


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