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-mfs
Commits
3997fba1
Unverified
Commit
3997fba1
authored
Mar 18, 2019
by
Łukasz Magiera
Committed by
GitHub
Mar 18, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #70 from ipfs/feat/flush-ctx
Wire up context to FlushPath
parents
e98bb251
9843dad7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
mfs_test.go
mfs_test.go
+4
-4
ops.go
ops.go
+2
-2
No files found.
mfs_test.go
View file @
3997fba1
...
...
@@ -817,19 +817,19 @@ func TestFlushing(t *testing.T) {
t
.
Fatal
(
err
)
}
if err := FlushPath(rt, "/a/b/c/TEST"); err != nil {
if
err
:=
FlushPath
(
ctx
,
rt
,
"/a/b/c/TEST"
);
err
!=
nil
{
t
.
Fatal
(
err
)
}
if err := FlushPath(rt, "/a/b/d/TEST"); err != nil {
if
err
:=
FlushPath
(
ctx
,
rt
,
"/a/b/d/TEST"
);
err
!=
nil
{
t
.
Fatal
(
err
)
}
if err := FlushPath(rt, "/a/b/e/TEST"); err != nil {
if
err
:=
FlushPath
(
ctx
,
rt
,
"/a/b/e/TEST"
);
err
!=
nil
{
t
.
Fatal
(
err
)
}
if err := FlushPath(rt, "/FILE"); err != nil {
if
err
:=
FlushPath
(
ctx
,
rt
,
"/FILE"
);
err
!=
nil
{
t
.
Fatal
(
err
)
}
...
...
ops.go
View file @
3997fba1
...
...
@@ -226,7 +226,7 @@ func DirLookup(d *Directory, pth string) (FSNode, error) {
// TODO: Document this function and link its functionality
// with the republisher.
func
FlushPath
(
rt
*
Root
,
pth
string
)
error
{
func
FlushPath
(
ctx
context
.
Context
,
rt
*
Root
,
pth
string
)
error
{
nd
,
err
:=
Lookup
(
rt
,
pth
)
if
err
!=
nil
{
return
err
...
...
@@ -237,6 +237,6 @@ func FlushPath(rt *Root, pth string) error {
return
err
}
rt
.
repub
.
WaitPub
(
c
ontext
.
TODO
()
)
rt
.
repub
.
WaitPub
(
c
tx
)
return
nil
}
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