From 85611aa456cddb38cd8163a35bac6b6fa5c8fd98 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 15 Oct 2021 10:23:58 +0200 Subject: [PATCH] storage/smbclient: add StoragePlugin.prefixes Should have been part of commit ef24cfa523b73848ba04d73154de1f95eb45a3b5 Closes https://github.com/MusicPlayerDaemon/MPD/issues/1279 --- src/storage/plugins/SmbclientStorage.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storage/plugins/SmbclientStorage.cxx b/src/storage/plugins/SmbclientStorage.cxx index 72eb4820c2..a033f3d7f8 100644 --- a/src/storage/plugins/SmbclientStorage.cxx +++ b/src/storage/plugins/SmbclientStorage.cxx @@ -186,15 +186,15 @@ SmbclientDirectoryReader::GetInfo([[maybe_unused]] bool follow) static std::unique_ptr CreateSmbclientStorageURI([[maybe_unused]] EventLoop &event_loop, const char *base) { - if (!StringStartsWithCaseASCII(base, "smb://")) - return nullptr; - SmbclientInit(); return std::make_unique(base); } +static constexpr const char *smbclient_prefixes[] = { "smb://", nullptr }; + const StoragePlugin smbclient_storage_plugin = { "smbclient", + smbclient_prefixes, CreateSmbclientStorageURI, };