Skip to content

Commit

Permalink
implement ipfs files command
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jeromy <[email protected]>
  • Loading branch information
whyrusleeping committed Jan 12, 2016
1 parent 13ef17e commit 6faa70e
Show file tree
Hide file tree
Showing 8 changed files with 955 additions and 8 deletions.
6 changes: 5 additions & 1 deletion commands/http/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,11 @@ func flushCopy(w io.Writer, r io.Reader) error {
n, err := r.Read(buf)
switch err {
case io.EOF:
return nil
if n <= 0 {
return nil
}
// if data was returned alongside the EOF, pretend we didnt
// get an EOF. The next read call should also EOF.
case nil:
// continue
default:
Expand Down
5 changes: 5 additions & 0 deletions core/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,10 @@ func setupNode(ctx context.Context, n *IpfsNode, cfg *BuildCfg) error {
}
n.Resolver = &path.Resolver{DAG: n.DAG}

err = n.loadFilesRoot()
if err != nil {
return err
}

return nil
}
Loading

0 comments on commit 6faa70e

Please sign in to comment.