[tracker/wip/carlosg/sparql1.1: 1/56] libtracker-data: Return after error



commit 961e8bdae77fd2d2b9ccfe8fa9af86f800036017
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Feb 28 23:08:17 2019 +0100

    libtracker-data: Return after error
    
    On the delete callbacks just depend 1) writeback and 2) GraphUpdated.
    It makes no sense to continue on emitting those there, if a property
    does not exist in the ontology, it is irrelevant to those listeners
    even if it could exist.

 src/libtracker-data/tracker-data-update.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libtracker-data/tracker-data-update.c b/src/libtracker-data/tracker-data-update.c
index c5d2941fc..463fbb42b 100644
--- a/src/libtracker-data/tracker-data-update.c
+++ b/src/libtracker-data/tracker-data-update.c
@@ -2606,9 +2606,9 @@ tracker_data_delete_statement (TrackerData  *data,
                                }
                        }
                } else {
-                       /* I wonder why in case of error the delete_callbacks are still executed */
                        g_set_error (error, TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNKNOWN_PROPERTY,
                                     "Property '%s' not found in the ontology", predicate);
+                       return;
                }
 
                if (!tried) {


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