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

Normalize paths upon construction without stat object #104

Closed
phated opened this issue Sep 7, 2016 · 3 comments
Closed

Normalize paths upon construction without stat object #104

phated opened this issue Sep 7, 2016 · 3 comments

Comments

@phated
Copy link
Member

phated commented Sep 7, 2016

As I brought up in @darsain's PR, I'm not sure we should normalize the history of an object upon construction if no stat object is passed. If the history represents a directory but no stat object is passed, will the paths be normalized incorrectly?

I'd like to get some feedback on this.

@phated
Copy link
Member Author

phated commented Sep 7, 2016

Actually, I don't think isDirectory or isSymbolic is used at all in normalization. Always normalizing should be fine.

@darsain
Copy link
Contributor

darsain commented Sep 7, 2016

If the history represents a directory but no stat object is passed, will the paths be normalized incorrectly?

That was the case when we were going with directories always ending in a separator. Since that got dropped, all paths are now going to look consistently the same.

Just search the index.js for isDirectory or isSymbolic and you'll see that there is no code dependent on them, so there is really no need for this issue :)

@phated
Copy link
Member Author

phated commented Sep 7, 2016

@darsain yeah, I was noticing that. I think the change just needs to be in the docs. Thanks for following up.

@phated phated closed this as completed in 80c0c83 Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants