Sorry, I thought this would be obvious.
In the attached screenshot you can see the current behavior. This sort order seems odd to me if you compare it to a normal Unix directory listing, where it would be:
Why is it confusing and wrong? Consider a long list of files (several hundred) with different cases (some start with capital letters, some don't) and look for a file (eg. bla.txt). You may not find it where most people would assume it.
I don't really care which comes first (uppercase or lowercase), but looking at a Unix system again, the file starting with a lowercase character comes first. My patch does not define the order, it just ignores the case and relies on the underlying implementation.
Apart from that, the sort order of artifacts also ignores the case. So however this may turn out, at least the sort order should be the same across all implementations of directory listings in Jenkins.