davglass / cpr

Nodejs cp -R
Other
79 stars 80 forks source link

Error: Unable to copy directory entirely #20

Closed fresheneesz closed 8 years ago

fresheneesz commented 8 years ago

Using cpr v1.0.0, I get the error Unable to copy directory entirely when i try to use CPR to copy directories in a linux centos environment. Things were working fine when I was using 0.4.2, so I'm just going to switch back to that.

davglass commented 8 years ago

Can I get any more information on this? There have only been two commits since that version: 2cd5e30a9d3341a70074bc6d996d8e8d527fdf5b & 3adcb911846c85257ae846037507b786d801fc82

The callback with that error should contain the list of files that had issues. Can you attach that for me? I can't fix what I can't replicate :)

fresheneesz commented 8 years ago

Ah, when looking at error.list it lead me to realize that cpr no longer overwrites automatically - it was giving me "exists" errors for all my file destinations. Works once I use the overwrite option. Thanks.

CharliePops commented 8 years ago

Unfortunately I am using a npm script and the cli doesn't accept options. It would be good to have that feature.

trusktr commented 10 months ago

I had the same problem. Adding the --overwrite option with the cli fixed the error for me.

The error is not helpful. Might be nice if it says something like "Error: not overwriting files without the 'overwrite' option" or similar.