Bug with directory names

Hi all,

I’ve been using Hugo with pleasure for a few weeks and ran into a bug.

Normally, my posts are in a directory /content/post/2017-01-15/.
Yesterday, I added another layer: /content/post/2017-01-15/foo-bar/ => that worked fine
but then I tried this directory: /content/post/2017-01-15/3s/ and I started having issues with pictures not showing up when testing with hugo server

I am using a private fork of the casper theme.
In my workflow, I use a script to prepare a new post which adds all pictures in the directory to an empty blogpost.md. I insert pictures using html tags for example:
<p><img src="../20170130_174531-IMG_0611.jpg" alt="Image 14"><p>
I this case, the name of the blog post was also “3S” with a capital. The html location would then be: http://localhost:1313/post/2017-01-15/3s/3S/
In the casper theme, the final “3S” directory only contains an index.html to make nice looking addresses. The photos are in “3s”.

I would have errors: image not found. If I tried to access it manually (by typing the address of the photo), the hugo server would give me a file not found 404 error.

In testing, I noticed that the server was actually confused with upper case and lower case in the directory name: it would fail if I tried to access manually the photo with http://localhost:1313/post/2017-01-15/3s/ (in the filesystem, I was using lowercase) but would succeed here: http://localhost:1313/post/2017-01-15/3S/

I solved the issue once I got rid of the directory name with both letters and numbers.

I think this is a bug somewhere in the hugo server code.

What do you guys think?

catkfr