-
Notifications
You must be signed in to change notification settings - Fork 772
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
Accidentally truncates file names ending with $$ #242
Comments
Thank you. This would be very helpful. |
I have written the test and it fails:
|
Here's a snapshot after disabling the
|
The breaking code appears to be https://github.com/jprichardson/node-fs-extra/blob/master/lib/copy/ncp.js#L82
|
This appears to be a "feature" of |
Ah, so it's treating it as Regex string that needs to be escaped.... hmm. |
Not quite? It's just because it thinks you might want special evaluation in the replacement string. It just turns out it always does this instead of only doing this on regexp first arguments. |
You know what I think I'm wrong on the why, but my guess is now after reading spec stuff is that they wanted string patterns to have some capture functionality. |
Unless any one else is feverishly working on this, I'd be delighted to submit a PR. @krainboltgreene any chance you still have that test lying around? No worries if not, but I'd like to be sure that my changes fix your problem. In any event, I'll write a test too. |
@hhamilto Any test you write that includes |
So I thought it was a browserify-hmr issue but I looked into their tests and while I could produce an error I discovered via console log that
fsExtra.copy
was the point at which it incorrectly created a file. I'm now looking at fs-extra's tests to reproduce.The text was updated successfully, but these errors were encountered: