From 09aa0dc676ead2a76c720a033271c8c7dbef1548 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Apr 2012 12:22:16 +0200 Subject: uri: remove g_basename() call from uri_get_suffix() g_basename() is deprecated in GLib 2.32. Instead, verify that the suffix does not have a backslash, to catch Windows path names. --- src/uri.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/uri.c') diff --git a/src/uri.c b/src/uri.c index f4d590a6..bd5aa024 100644 --- a/src/uri.c +++ b/src/uri.c @@ -34,13 +34,13 @@ bool uri_has_scheme(const char *uri) const char * uri_get_suffix(const char *uri) { - const char *suffix = strrchr(g_basename(uri), '.'); + const char *suffix = strrchr(uri, '.'); if (suffix == NULL) return NULL; ++suffix; - if (strchr(suffix, '/') != NULL) + if (strpbrk(suffix, "/\\") != NULL) return NULL; return suffix; -- cgit v1.2.3