getpelican/pelican — pull request #1183 by Rogdham (2013-12-07 16:54:01+00:00)
Title: Fix `utils.copy` for copying files

# Bug description

`utils.copy('', 'a/b.ext0', 'c/d.ext1')` is copying `a/b.ext0` into `c/d.ext1/b.ext0` (creating folder `c/d.ext1` in the process) instead of `c/d.ext1`.

Bug introduced by e03cf3f51735d5387fee7064cae89aaa1d34a0a6.

# How to reproduce

Run `pelican-quickstart`, and add the following to the setting file:

OUTPUT_SOURCES = True
ARTICLE_URL = 'articles/{slug}'
ARTICLE_SAVE_AS = ARTICLE_URL + '.html'

Create an article (e.g. `content/a.md`), and run `make html`.

*Expected behaviour:* source output as `output/articles/hello-world.text`.
*Observed behaviour:* source output as `output/articles/hello-word.text/a.md`.