Skip to content

Commit

Permalink
commands(add): allow adding urls with add --nocopy without enabling…
Browse files Browse the repository at this point in the history
… the filestore

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
  • Loading branch information
Stebalien committed Mar 29, 2019
1 parent 337bf0f commit 49316b5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/coreapi/unixfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"

"github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/filestore"

"github.com/ipfs/go-ipfs/core/coreunix"

Expand Down Expand Up @@ -49,8 +48,8 @@ func (api *UnixfsAPI) Add(ctx context.Context, files files.Node, opts ...options
// return
//}

if settings.NoCopy && !cfg.Experimental.FilestoreEnabled {
return nil, filestore.ErrFilestoreNotEnabled
if settings.NoCopy && !(cfg.Experimental.FilestoreEnabled || cfg.Experimental.UrlstoreEnabled) {
return nil, fmt.Errorf("either the filestore or the urlstore must be enabled to use nocopy, see: https://git.io/vNItf")
}

addblockstore := api.blockstore
Expand Down

2 comments on commit 49316b5

@GitCop
Copy link

@GitCop GitCop commented on 49316b5 Mar 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were the following issues with your Pull Request

We ask for a few features in the commit message for Open Source licensing hygiene and commit message clarity.
git commit --amend can often help you quickly improve the commit message.
Guidelines and a script are available to help in the long run.
Your feedback on GitCop is welcome on this issue.


This message was auto-generated by https://gitcop.com

@GitCop
Copy link

@GitCop GitCop commented on 49316b5 Mar 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were the following issues with your Pull Request

We ask for a few features in the commit message for Open Source licensing hygiene and commit message clarity.
git commit --amend can often help you quickly improve the commit message.
Guidelines and a script are available to help in the long run.
Your feedback on GitCop is welcome on this issue.


This message was auto-generated by https://gitcop.com

Please sign in to comment.