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
72525912
Commit
72525912
authored
Jan 28, 2015
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement path type
parent
f0f00316
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
tar/reader.go
tar/reader.go
+2
-6
No files found.
tar/reader.go
View file @
72525912
...
@@ -7,7 +7,6 @@ import (
...
@@ -7,7 +7,6 @@ import (
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
"io"
"io"
gopath
"path"
gopath
"path"
"strings"
"time"
"time"
mdag
"github.com/jbenet/go-ipfs/merkledag"
mdag
"github.com/jbenet/go-ipfs/merkledag"
...
@@ -29,10 +28,7 @@ type Reader struct {
...
@@ -29,10 +28,7 @@ type Reader struct {
err
error
err
error
}
}
func
NewReader
(
path
string
,
dag
mdag
.
DAGService
,
resolver
*
path
.
Resolver
,
compression
int
)
(
*
Reader
,
error
)
{
func
NewReader
(
path
path
.
Path
,
dag
mdag
.
DAGService
,
resolver
*
path
.
Resolver
,
compression
int
)
(
*
Reader
,
error
)
{
if
strings
.
HasPrefix
(
path
,
"/ipfs/"
)
{
path
=
path
[
6
:
]
}
reader
:=
&
Reader
{
reader
:=
&
Reader
{
signalChan
:
make
(
chan
struct
{}),
signalChan
:
make
(
chan
struct
{}),
...
@@ -58,7 +54,7 @@ func NewReader(path string, dag mdag.DAGService, resolver *path.Resolver, compre
...
@@ -58,7 +54,7 @@ func NewReader(path string, dag mdag.DAGService, resolver *path.Resolver, compre
// writeToBuf will write the data to the buffer, and will signal when there
// writeToBuf will write the data to the buffer, and will signal when there
// is new data to read
// is new data to read
_
,
filename
:=
gopath
.
Split
(
path
)
_
,
filename
:=
gopath
.
Split
(
path
.
String
()
)
go
reader
.
writeToBuf
(
dagnode
,
filename
,
0
)
go
reader
.
writeToBuf
(
dagnode
,
filename
,
0
)
return
reader
,
nil
return
reader
,
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