提交 bf5fd74a 作者: Steven Allen

fix defered unlock of pin lock in AddR

This wasn't causing any problems because this function is actually dead
code (but possibly useful?).

License: MIT
Signed-off-by: 's avatarSteven Allen <steven@stebalien.com>
上级 c1a488f5
......@@ -322,7 +322,7 @@ func AddWithContext(ctx context.Context, n *core.IpfsNode, r io.Reader) (string,
// AddR recursively adds files in |path|.
func AddR(n *core.IpfsNode, root string) (key string, err error) {
n.Blockstore.PinLock().Unlock()
defer n.Blockstore.PinLock().Unlock()
stat, err := os.Lstat(root)
if err != nil {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论