Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
254ac1b1
Commit
254ac1b1
authored
Sep 22, 2018
by
Michael Avila
Committed by
Steven Allen
Sep 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix inability to pin two things at once
License: MIT Signed-off-by:
Michael Avila
<
me@michaelavila.com
>
parent
86559e9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
pin/pin.go
pin/pin.go
+6
-2
No files found.
pin/pin.go
View file @
254ac1b1
...
...
@@ -228,16 +228,20 @@ func (p *pinner) Pin(ctx context.Context, node ipld.Node, recurse bool) error {
if
p
.
directPin
.
Has
(
c
)
{
p
.
directPin
.
Remove
(
c
)
}
p
.
lock
.
Unlock
()
// fetch entire graph
err
:=
mdag
.
FetchGraph
(
ctx
,
c
,
p
.
dserv
)
p
.
lock
.
Lock
()
if
err
!=
nil
{
return
err
}
p
.
recursePin
.
Add
(
c
)
}
else
{
if
_
,
err
:=
p
.
dserv
.
Get
(
ctx
,
c
);
err
!=
nil
{
p
.
lock
.
Unlock
()
_
,
err
:=
p
.
dserv
.
Get
(
ctx
,
c
)
p
.
lock
.
Lock
()
if
err
!=
nil
{
return
err
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment