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
5fcd9a1f
Commit
5fcd9a1f
authored
9 years ago
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use correct context in pubfunc pinning
License: MIT Signed-off-by:
Jeromy
<
jeromyj@gmail.com
>
parent
d2e0d73b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
core/core.go
core/core.go
+4
-4
mfs/ops.go
mfs/ops.go
+1
-0
No files found.
core/core.go
View file @
5fcd9a1f
...
...
@@ -475,15 +475,15 @@ func (n *IpfsNode) loadFilesRoot() error {
dsk
:=
ds
.
NewKey
(
"/local/filesroot"
)
pf
:=
func
(
ctx
context
.
Context
,
k
key
.
Key
)
error
{
ds
:=
n
.
Repo
.
Datastore
()
if
old
,
err
:=
ds
.
Get
(
dsk
);
err
==
nil
{
_
=
n
.
Pinning
.
Unpin
(
n
.
Context
()
,
key
.
Key
(
old
.
([]
byte
)),
true
)
if
old
,
err
:=
ds
.
Get
(
dsk
);
err
==
nil
&&
old
!=
nil
{
_
=
n
.
Pinning
.
Unpin
(
ctx
,
key
.
Key
(
old
.
([]
byte
)),
true
)
}
nnd
,
err
:=
n
.
DAG
.
Get
(
n
.
Context
()
,
k
)
nnd
,
err
:=
n
.
DAG
.
Get
(
ctx
,
k
)
if
err
!=
nil
{
return
err
}
if
err
:=
n
.
Pinning
.
Pin
(
n
.
Context
()
,
nnd
,
true
);
err
!=
nil
{
if
err
:=
n
.
Pinning
.
Pin
(
ctx
,
nnd
,
true
);
err
!=
nil
{
return
err
}
...
...
This diff is collapsed.
Click to expand it.
mfs/ops.go
View file @
5fcd9a1f
...
...
@@ -162,6 +162,7 @@ func Mkdir(r *Root, pth string, mkparents bool, flush bool) error {
func
Lookup
(
r
*
Root
,
path
string
)
(
FSNode
,
error
)
{
dir
,
ok
:=
r
.
GetValue
()
.
(
*
Directory
)
if
!
ok
{
log
.
Error
(
"root not a dir: %#v"
,
r
.
GetValue
())
return
nil
,
errors
.
New
(
"root was not a directory"
)
}
...
...
This diff is collapsed.
Click to expand it.
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