aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-04-04 12:22:16 +0200
committerMax Kellermann <max@duempel.org>2012-04-04 12:22:16 +0200
commit09aa0dc676ead2a76c720a033271c8c7dbef1548 (patch)
treeb8b97cb9eda1f95d7aa701e429463e2424c55c66
parent83174de420eb2a63d77a7953081b3fb360ecbc31 (diff)
downloadmpd-09aa0dc676ead2a76c720a033271c8c7dbef1548.tar.gz
mpd-09aa0dc676ead2a76c720a033271c8c7dbef1548.tar.xz
mpd-09aa0dc676ead2a76c720a033271c8c7dbef1548.zip
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.
Diffstat (limited to '')
-rw-r--r--src/uri.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/uri.c b/src/uri.c
index f4d590a60..bd5aa0249 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;