storage/curl: unescape file names from PROPFIND

This is the last missing piece for https://github.com/MusicPlayerDaemon/MPD/issues/662
This commit is contained in:
Max Kellermann 2019-10-15 16:49:17 +02:00
parent f0386459ee
commit 0b9435858b

View File

@ -122,6 +122,10 @@ public:
std::rethrow_exception(postponed_error); std::rethrow_exception(postponed_error);
} }
CURL *GetEasy() noexcept {
return request.Get();
}
protected: protected:
void SetDone() { void SetDone() {
assert(!done); assert(!done);
@ -277,6 +281,7 @@ public:
// TODO: send request body // TODO: send request body
} }
using BlockingHttpRequest::GetEasy;
using BlockingHttpRequest::Wait; using BlockingHttpRequest::Wait;
protected: protected:
@ -524,10 +529,7 @@ protected:
if (escaped_name.IsNull()) if (escaped_name.IsNull())
return; return;
// TODO: unescape entries.emplace_front(CurlUnescape(GetEasy(), escaped_name));
const auto name = escaped_name;
entries.emplace_front(std::string(name.data, name.size));
auto &info = entries.front().info; auto &info = entries.front().info;
info = StorageFileInfo(r.collection info = StorageFileInfo(r.collection