Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: Fix adding multiple files #6255

Merged
merged 3 commits into from Apr 25, 2019
Merged

add: Fix adding multiple files #6255

merged 3 commits into from Apr 25, 2019

Conversation

magik6k
Copy link
Member

@magik6k magik6k commented Apr 25, 2019

See #6254

magik6k added 3 commits Apr 25, 2019
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
@ghost ghost assigned magik6k Apr 25, 2019
@ghost ghost added the status/in-progress In progress label Apr 25, 2019
@magik6k magik6k requested a review from Stebalien Apr 25, 2019
Copy link
Member

@Stebalien Stebalien left a comment

LGTM. I'd like to reconsider how we're doing events (ideally, we'd be able to reuse the channel) but we can handle that in a followup PR.

_, dir := addit.Node().(files.Directory)
errCh := make(chan error, 1)
events := make(chan interface{}, adderOutChanSize)
opts[len(opts)-1] = options.Unixfs.Events(events)
Copy link
Member

@Stebalien Stebalien Apr 25, 2019

Choose a reason for hiding this comment

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

Maybe we shouldn't be closing this channel?

Copy link
Member

@Stebalien Stebalien Apr 25, 2019

Choose a reason for hiding this comment

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

Otherwise, we could drop the need for the nil option by writing:

opts := append(opts, options.Unixfs.Events(events)) // note the :=

@Stebalien Stebalien merged commit 5d9651a into master Apr 25, 2019
7 checks passed
@Stebalien Stebalien deleted the fix/add-many branch Apr 25, 2019
@ghost ghost removed the status/in-progress In progress label Apr 25, 2019
@momack2 momack2 added this to Done in ipfs/go-ipfs May 9, 2019
@Kubuxu Kubuxu mentioned this pull request May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants