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

`dir_copy` removes files in target directory #51

mllg opened this Issue Jan 24, 2018 · 1 comment


None yet
2 participants
Copy link

mllg commented Jan 24, 2018

dir_create(c("a", "b"))
file_create(path("a", "foo"))
file_create(path("b", "bar"))
dir_copy("a", "b", overwrite = TRUE)
dir_ls("b") # file bar is deleted

I don't know if this is intended, but it is not clearly documented and could lead to unwanted data loss. 😟


This comment has been minimized.

Copy link

jimhester commented Jan 24, 2018

Yes this is not right, it should have the same semantics as cp a b for this, so a/ would be copied into b/a.

@jimhester jimhester closed this in 6750e87 Jan 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment