summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorportix <none@none>2012-09-24 21:56:23 +0200
committerportix <none@none>2012-09-24 21:56:23 +0200
commitfa7d39c874b4f0be395995f0469b05d15c8dd5ba (patch)
treef7974e5fdbc7fb0564a4b3ebb935beec5406a847 /src
parent8487e3d438a35e27374f1dfcd7b01c73ddc1fbef (diff)
downloaddwb-fa7d39c874b4f0be395995f0469b05d15c8dd5ba.zip
Don't ignore case in directory listings, closing #203
Diffstat (limited to 'src')
-rw-r--r--src/util.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 5265f817..efa8fa4e 100644
--- a/src/util.c
+++ b/src/util.c
@@ -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 * {{{*/