mojombo/jekyll — pull request #758 by nitoyon (2013-01-13 07:03:40+00:00)
Title: Site#cleanup delete too much directories

# Symptoms

When a post (`2008-10-18-foo-bar.textile`) exists, `Site#cleanup` should not delete `_site/2008/10/18/foo-bar.html`.

But actually, it deletes `_site/2008`.

# Causes

`Site#cleanup` should mark

* `_site/2008/10/18/foo-bar.html`
* `_site/2008/10/18`
* `_site/2008/10`
* `_site/2008`

as files to be written.

But it actually marks only

* `_site/2008/10/18/foo-bar.html`
* `_site/2008/10/18`.

# Resolution

* Fix written file enumuration to be recursive in `Site#cleanup`.
* Add new assertion and fix file lock problem in test.