AvianFlu / ncp

Asynchronous recursive file copying with Node.js.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

usage of replace function disallows dollar signs in paths

spustlik opened this issue · comments

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

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 👍

I would like to have that too