diff options
author | Max Kellermann <max@duempel.org> | 2012-04-04 12:22:16 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-04-04 12:22:16 +0200 |
commit | 09aa0dc676ead2a76c720a033271c8c7dbef1548 (patch) | |
tree | b8b97cb9eda1f95d7aa701e429463e2424c55c66 | |
parent | 83174de420eb2a63d77a7953081b3fb360ecbc31 (diff) | |
download | mpd-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |