[tracker/tracker-0.10] libtracker-sparql: Ensure Builder.length is not 0 when not empty



commit a8f482404b8a9de798cded8f9b1c9d22cf62fccb
Author: Jürg Billeter <j bitron ch>
Date:   Tue Apr 5 17:05:47 2011 +0200

    libtracker-sparql: Ensure Builder.length is not 0 when not empty
    
    This caused preupdate fragments from extractors to be dropped in
    certain situations.
    
    Fixes NB#237582.

 src/libtracker-sparql/tracker-builder.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-sparql/tracker-builder.vala b/src/libtracker-sparql/tracker-builder.vala
index aa54b09..bbd6a25 100644
--- a/src/libtracker-sparql/tracker-builder.vala
+++ b/src/libtracker-sparql/tracker-builder.vala
@@ -689,6 +689,8 @@ public class Tracker.Sparql.Builder : Object {
 	public void prepend (string raw)
 	{
 		str.prepend ("%s\n".printf (raw));
+
+		length++;
 	}
 
 	/**
@@ -708,6 +710,8 @@ public class Tracker.Sparql.Builder : Object {
 		}
 
 		str.append (raw);
+
+		length++;
 	}
 }
 



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