diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-20 12:28:36 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-23 18:24:47 -0600 |
commit | ba8fd9042ad4a5da3f5d2e3db6350793666ea403 (patch) | |
tree | 2e64a94a5b1acfeee3c7650ea859a1b60e490472 /lib/btrfs/btrfstree | |
parent | f0a9faf21dbe508d57da3b18be9121559c70876a (diff) |
btrfstree: LookupTreeRoot: Don't discard the context of an error
Diffstat (limited to 'lib/btrfs/btrfstree')
-rw-r--r-- | lib/btrfs/btrfstree/btree_forrest.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/btrfs/btrfstree/btree_forrest.go b/lib/btrfs/btrfstree/btree_forrest.go index 8f8e2de..197edc2 100644 --- a/lib/btrfs/btrfstree/btree_forrest.go +++ b/lib/btrfs/btrfstree/btree_forrest.go @@ -59,7 +59,7 @@ func LookupTreeRoot(_ context.Context, fs TreeOperator, sb Superblock, treeID bt rootItem, err := fs.TreeSearch(btrfsprim.ROOT_TREE_OBJECTID, SearchRootItem(treeID)) if err != nil { if errors.Is(err, ErrNoItem) { - err = ErrNoTree + err = fmt.Errorf("%w: %s", ErrNoTree, err) } return nil, fmt.Errorf("tree %s: %w", treeID.Format(btrfsprim.ROOT_TREE_OBJECTID), err) } |