Skip to content
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

cp -r doesn't match linux when destination doesn't exist #101

Closed
gdw2 opened this issue Jan 22, 2014 · 3 comments
Closed

cp -r doesn't match linux when destination doesn't exist #101

gdw2 opened this issue Jan 22, 2014 · 3 comments
Assignees
Labels
duplicate fix Bug/defect, or a fix for such a problem

Comments

@gdw2
Copy link

gdw2 commented Jan 22, 2014

In linux, new_dir and existing_dir are now copies (new_dir didn't exist before):

$ mkdir existing_dir
$ touch existing_dir/foo
$ cp -rf existing_dir new_dir

With shelljs, new_dir/existing_dir and existing_dir are copies. I would expect the linux behavior.

cp('-rf', 'existing_dir', 'new_dir')
@gdw2
Copy link
Author

gdw2 commented Jan 22, 2014

This provides the behavior I expect above (added the trailing slash), but I still think the above scenario represents a valid bug.

cp('-rf', 'existing_dir/', 'new_dir')

@Schoonology
Copy link
Contributor

Agreed and confirmed.

@nfischer
Copy link
Member

nfischer commented Jan 8, 2016

This should be fixed by #271. Would anyone here be able to confirm that this PR fixes it? As far as I can tell, it seems to be good.

@ariporad ariporad added duplicate fix Bug/defect, or a fix for such a problem labels Jan 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate fix Bug/defect, or a fix for such a problem
Projects
None yet
Development

No branches or pull requests

4 participants