Change parameters of LoadTree()

This commit is contained in:
Alexander Neumann
2015-02-17 22:37:34 +01:00
parent 5a16a66973
commit 4d1e7b9f24
5 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -32,9 +32,9 @@ func (t Tree) String() string {
return fmt.Sprintf("Tree<%d nodes, %d blobs>", len(t.Nodes), len(t.Map.list))
}
func LoadTree(s Server, blob Blob) (*Tree, error) {
func LoadTree(s Server, id backend.ID) (*Tree, error) {
tree := &Tree{}
err := s.LoadJSON(backend.Tree, blob, tree)
err := s.LoadJSONID(backend.Tree, id, tree)
if err != nil {
return nil, err
}
@@ -45,7 +45,7 @@ func LoadTree(s Server, blob Blob) (*Tree, error) {
// LoadTreeRecursive loads the tree and all subtrees via s.
func LoadTreeRecursive(path string, s Server, blob Blob) (*Tree, error) {
// TODO: load subtrees in parallel
tree, err := LoadTree(s, blob)
tree, err := LoadTree(s, blob.Storage)
if err != nil {
return nil, err
}