diff options
Diffstat (limited to '')
-rw-r--r-- | src/ls.cxx | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/ls.cxx b/src/ls.cxx index b1a636416..96c9f60e5 100644 --- a/src/ls.cxx +++ b/src/ls.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2013 The Music Player Daemon Project + * Copyright (C) 2003-2014 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -19,14 +19,11 @@ #include "config.h" #include "ls.hxx" +#include "util/StringUtil.hxx" #include "util/UriUtil.hxx" -#include "Client.hxx" - -#include <glib.h> +#include "client/Client.hxx" #include <assert.h> -#include <string.h> - /** * file:// is not included in remoteUrlPrefixes, the connection method @@ -52,12 +49,21 @@ static const char *remoteUrlPrefixes[] = { "rtmpt://", "rtmps://", #endif +#ifdef ENABLE_SMBCLIENT + "smb://", +#endif +#ifdef ENABLE_NFS + "nfs://", +#endif #ifdef ENABLE_CDIO_PARANOIA "cdda://", #endif #ifdef ENABLE_DESPOTIFY "spt://", #endif +#ifdef HAVE_ALSA + "alsa://", +#endif NULL }; @@ -92,7 +98,7 @@ bool uri_supported_scheme(const char *uri) assert(uri_has_scheme(uri)); while (*urlPrefixes) { - if (g_str_has_prefix(uri, *urlPrefixes)) + if (StringStartsWith(uri, *urlPrefixes)) return true; urlPrefixes++; } |