summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-10-15 16:49:17 +0200
committerMax Kellermann <max@musicpd.org>2019-10-15 16:49:17 +0200
commit0b9435858b7bfc68b9a73d6b26eb6c8c5c0d7f13 (patch)
tree54340b98a53e09ee3d661a83c15b76e9d522cd99 /src
parentf0386459ee5759fe1ff54eacc34525b03901ba6b (diff)
storage/curl: unescape file names from PROPFIND
This is the last missing piece for https://github.com/MusicPlayerDaemon/MPD/issues/662
Diffstat (limited to 'src')
-rw-r--r--src/storage/plugins/CurlStorage.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx
index 581a0cca4..ee1c00845 100644
--- a/src/storage/plugins/CurlStorage.cxx
+++ b/src/storage/plugins/CurlStorage.cxx
@@ -122,6 +122,10 @@ public:
std::rethrow_exception(postponed_error);
}
+ CURL *GetEasy() noexcept {
+ return request.Get();
+ }
+
protected:
void SetDone() {
assert(!done);
@@ -277,6 +281,7 @@ public:
// TODO: send request body
}
+ using BlockingHttpRequest::GetEasy;
using BlockingHttpRequest::Wait;
protected:
@@ -524,10 +529,7 @@ protected:
if (escaped_name.IsNull())
return;
- // TODO: unescape
- const auto name = escaped_name;
-
- entries.emplace_front(std::string(name.data, name.size));
+ entries.emplace_front(CurlUnescape(GetEasy(), escaped_name));
auto &info = entries.front().info;
info = StorageFileInfo(r.collection