[rygel] core: don't delete root container when in db



commit d22a0191b03eddb141900414d5a4cd01bc369a9f
Author: Jens Georg <mail jensge org>
Date:   Sun Jul 5 16:06:19 2009 +0200

    core: don't delete root container when in db

 src/rygel/rygel-media-db.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-media-db.vala b/src/rygel/rygel-media-db.vala
index dcef75c..e3b3b96 100644
--- a/src/rygel/rygel-media-db.vala
+++ b/src/rygel/rygel-media-db.vala
@@ -184,7 +184,7 @@ public class Rygel.MediaDB : Object {
     "DELETE FROM Object WHERE Object.upnp_id = ?";
 
     private const string SWEEPER_STRING =
-    "DELETE FROM Object WHERE parent IS NULL";
+    "DELETE FROM Object WHERE parent IS NULL AND Object.upnp_id != '0'";
 
     private const string GET_CHILD_ID_STRING =
     "SELECT upnp_id FROM OBJECT WHERE parent = ?";



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