Closed surajreddy closed 10 years ago
Can you please provide an example so that I can test it.. It does what it's expected to do in my unit tests.
Can I take a look at the test? Maybe I'm overlooking something in my code.
I'm trying to do a cp -R -f
Here's my code:
cpr(source_folder, dest_path, {
deleteFirst: true,
overwrite: true
}, function(err) {
if (err) {
return cb(err); //return error
}
});
I tried it without the deleteFirst to be safe.
When there are no files present it seems to copy fine, but when there are files there it doesn't seem to overwrite them.
I think it's something else with my folder structures. I'll re-open if I still face the issue.
Just an update - turns out it was a race condition with another task. The files were getting copied, but then overwritten by a different gulp task.
Thank you for humoring me, and I'm sorry to have wasted your time.
If I'm copying dirA to parent, then dirA/test.png doesn't seem to overwrite parent/dirA/test.png with the overwrite flag set to true. Is this not supported?
Thanks!