Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

files add, cat, get core + cli #197

Closed
wants to merge 2 commits into from
Closed

files add, cat, get core + cli #197

wants to merge 2 commits into from

Conversation

nginnever
Copy link
Member

No description provided.

@jbenet jbenet added the status/in-progress In progress label May 6, 2016
}
if (inPath === '.' && recursive === true) {
inPath = process.cwd()
return inPath
Copy link
Member

Choose a reason for hiding this comment

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

Is there a need for this return?

Copy link
Member Author

Choose a reason for hiding this comment

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

inPath is not declared in this scope and needs to be returned on line 58, unless I'm missing something.

Copy link
Member

Choose a reason for hiding this comment

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

I mean, since there is the return of inPath in the end of the func and this assignment of inPath is within a if/else clause, you just need the return once

filePair = {path: addPath, stream: rs}
i.write(filePair)
callback()
}
Copy link
Member

Choose a reason for hiding this comment

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

This could be simplified:

if (!fs.statSync(element).isDirectory()) {
  i.write({path: addPath, stream: fs.createReadStrem(element})
}
callback()

@daviddias
Copy link
Member

@nginnever CR'ed :)

@dignifiedquire dignifiedquire mentioned this pull request May 9, 2016
@dignifiedquire
Copy link
Member

Merged in #204

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants