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

Filter mixes path separators on Windows #57

Closed
whitlockjc opened this issue Sep 18, 2014 · 2 comments
Closed

Filter mixes path separators on Windows #57

whitlockjc opened this issue Sep 18, 2014 · 2 comments

Comments

@whitlockjc
Copy link

I recently ran into an issue on a127 where the filter callback used to filter out paths not to copy was not matching. When I did a little debugging, I noticed that ncp was passing in a file name with both \ and / in it. Basically, the / started at the copy root path. So if I started copying from C:\Users\Jeremy Whitlock\Projects\a127, all path segments after C:\Users\Jeremy Whitlock\Projects\a127 used / for path separators. For example, when ncp called the filter for the C:\Users\Jeremy Whitlock\Projects\a127\package.json file, the file name passed to the filter is C:\Users\Jeremy Whitlock\Projects\a127/package.json.

@kylepaulsen
Copy link

I second this. It looks like path.join isn't being used on

ncp/lib/ncp.js

Line 176 in e9e6fae

startCopy(dir + '/' + item);

@mmalecki
Copy link
Collaborator

Fixed, thanks for reporting!

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

3 participants