AvianFlu / ncp

Asynchronous recursive file copying with Node.js.
MIT License
680 stars 103 forks source link

usage of replace function disallows dollar signs in paths #72

Open spustlik opened 9 years ago

spustlik commented 9 years ago

if i try to copy from folder myfolder to $$$temp$$$\myfolder, it will fail, because string.replace function interprets second parameter and replaces $$ to $ (for example). it is easy to fix - just instead of var target = link.replace(currentPath, targetPath); call var target = link.replace(currentPath, function () { return targetPath; });

thank you

jvtrigueros commented 9 years ago

Super bump on this, I came all the way from node-webkit-builder because I was getting an error where a file with double $ wasn't being copied over. I could not identify where the issue was until I dug further. Please accept @spustlik 's PR all the tests pass :+1:

anthonyraymond commented 6 years ago

I would like to have that too