diff options
author | portix <none@none> | 2012-09-24 21:56:23 +0200 |
---|---|---|
committer | portix <none@none> | 2012-09-24 21:56:23 +0200 |
commit | fa7d39c874b4f0be395995f0469b05d15c8dd5ba (patch) | |
tree | f7974e5fdbc7fb0564a4b3ebb935beec5406a847 /src/util.c | |
parent | 8487e3d438a35e27374f1dfcd7b01c73ddc1fbef (diff) | |
download | dwb-fa7d39c874b4f0be395995f0469b05d15c8dd5ba.zip |
Don't ignore case in directory listings, closing #203
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -17,6 +17,7 @@ */ #include <string.h> +#include <strings.h> #include <stdlib.h> #include <ctype.h> #include <errno.h> @@ -621,7 +622,11 @@ util_domain_from_uri(const char *uri) { /* util_compare_path(char *uri) return: char* {{{*/ int util_compare_path(const char *a, const char *b) { - return g_strcmp0(g_strrstr(a, "/"), g_strrstr(b, "/")); + if (a == NULL) + return 1; + else if (b == NULL) + return -1; + return strcasecmp(g_strrstr(a, "/"), g_strrstr(b, "/")); }/*}}}*/ /* util_basename(const char *path) return: char * {{{*/ |