@parkr well it's been almost a year (wow... 11 months ago) since I submitted this. :smile:

OK, I dug through the code again. Nice catch! But it doesn't seem to matter since this is the directory where the file / page will be put into and not a (pretty) URL.

It appears it's **not** related to this commit but it just surfaced from the tests. The "issue" lies within [`#dir`](https://github.com/fotos/jekyll/blob/4090500c5a9220e49eb0e0c77fcd843d5feaef08/lib/jekyll/page.rb#L32).

For example when the URL is `/contacts/index.html`, it doesn't end with a slash and `File#basename` returns `/contacts`. When the URL is `/contacts/bar/` it ends with a URL and the dir is returned as is (same at the URL).

Honestly I'm more concerned with the [**"A Page processing pages with pretty url style in a directory hierarchy should create url based on filename"**](https://github.com/fotos/jekyll/blob/4090500c5a9220e49eb0e0c77fcd843d5feaef08/test/test_page.rb#L66) test which should return "/contacts/" as the **pretty URL** for the index file in a directory.

I will investigate this a bit more when I get home. Looks like that `#dir` and/or `#template` might have to be changed a bit.