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-unixfs
Commits
aee8b331
Commit
aee8b331
authored
Feb 19, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix minor mfs truncate bug
License: MIT Signed-off-by:
Jeromy
<
jeromyj@gmail.com
>
parent
40e7d74e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
mod/dagmodifier.go
mod/dagmodifier.go
+1
-1
mod/dagmodifier_test.go
mod/dagmodifier_test.go
+14
-0
No files found.
mod/dagmodifier.go
View file @
aee8b331
...
@@ -6,8 +6,8 @@ import (
...
@@ -6,8 +6,8 @@ import (
"io"
"io"
"os"
"os"
proto
"gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
mh
"gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash"
mh
"gx/ipfs/QmYf7ng2hG5XBtJA3tN34DQ2GUN5HNksEw1rLDkmr6vGku/go-multihash"
proto
"gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
context
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
key
"github.com/ipfs/go-ipfs/blocks/key"
key
"github.com/ipfs/go-ipfs/blocks/key"
...
...
mod/dagmodifier_test.go
View file @
aee8b331
...
@@ -447,6 +447,20 @@ func TestDagTruncate(t *testing.T) {
...
@@ -447,6 +447,20 @@ func TestDagTruncate(t *testing.T) {
if
size
!=
10
{
if
size
!=
10
{
t
.
Fatal
(
"size was incorrect!"
)
t
.
Fatal
(
"size was incorrect!"
)
}
}
err
=
dagmod
.
Truncate
(
0
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
size
,
err
=
dagmod
.
Size
()
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
if
size
!=
0
{
t
.
Fatal
(
"size was incorrect!"
)
}
}
}
func
TestSparseWrite
(
t
*
testing
.
T
)
{
func
TestSparseWrite
(
t
*
testing
.
T
)
{
...
...
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