loolwsd: Fix convert-to regression; fix incorrect filepath formed
Regressed with 886af28bc2
Poco::URI::encode appends to given string, and encodedTo already
had content leading to incorrect path. Use a new std::string variable.
Change-Id: Ia72ff60ed9cf7f14ff649416a2ceeeda13ff6197
This commit is contained in:
parent
9417ec839c
commit
39645c974d
1 changed files with 3 additions and 2 deletions
|
@ -435,8 +435,9 @@ private:
|
|||
if (!resultURL.getPath().empty())
|
||||
{
|
||||
const std::string mimeType = "application/octet-stream";
|
||||
URI::encode(resultURL.getPath(), "", encodedTo);
|
||||
response.sendFile(encodedTo, mimeType);
|
||||
std::string encodedFilePath;
|
||||
URI::encode(resultURL.getPath(), "", encodedFilePath);
|
||||
response.sendFile(encodedFilePath, mimeType);
|
||||
sent = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue