When running cp -R in command line on a single file, the source file gets copied at the target path, the last bit of the path becoming the new file name unless there is a trailing /.
For example, starting with this structure:
foo/
`-- bar.jpg
baz/
cp -R foo/bar.jpg baz/qux.jpg results in:
foo/
`-- bar.jpg
baz/
`-- qux.jpg
but cp -R foo/bar.jpg baz/qux/ results in:
foo/
`-- bar.jpg
baz/
`-- qux/
`-- bar.jpg
This pull request recreates this behavior and fixes #28.
When running
cp -R
in command line on a single file, the source file gets copied at the target path, the last bit of the path becoming the new file name unless there is a trailing/
.For example, starting with this structure:
cp -R foo/bar.jpg baz/qux.jpg
results in:but
cp -R foo/bar.jpg baz/qux/
results in:This pull request recreates this behavior and fixes #28.