]> git.phdru.name Git - bookmarks_db.git/blobdiff - Storage/bkmk_stjson.py
Load/store folder's root.
[bookmarks_db.git] / Storage / bkmk_stjson.py
index cd6139faa36c66afdaf65c57deb479e13e46b99f..00daa60361710e5c330cb51b62bc952c279bc757 100644 (file)
@@ -39,6 +39,8 @@ class storage_json(Walker):
         dict["lastModified"] = f.last_modified
         parent_idx = getattr(f, 'parent_idx')
         if parent_idx: dict["parent"] = parent_idx
+        root = getattr(f, 'root')
+        if root: dict["root"] = root
         dict["title"] = f.name.decode('utf-8')
         dict["type"] = "text/x-moz-place-container"
         self.folder_stack[-1].append(dict)
@@ -118,6 +120,7 @@ class storage_json(Walker):
         folder.id = fdict["id"]
         folder.index = fdict.get("index")
         folder.parent_idx = fdict.get("parent")
+        folder.root = fdict.get("root")
         folder.name = encode(fdict["title"])
 
         for record in fdict["children"]: