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.
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 fromC:\Users\Jeremy Whitlock\Projects\a127
, all path segments afterC:\Users\Jeremy Whitlock\Projects\a127
used/
for path separators. For example, when ncp called the filter for theC:\Users\Jeremy Whitlock\Projects\a127\package.json
file, the file name passed to the filter isC:\Users\Jeremy Whitlock\Projects\a127/package.json
.