wsd/DocumentBroker.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit 3d3349c06f5a462b08c08af78f1f054a453bc5c7 Author: Andras Timar <andras.ti...@collabora.com> Date: Sun Feb 18 00:24:08 2018 +0100 wsd: encode '#' character in file name Change-Id: I4d10f38c9025f18a0d0f0f5599892b436b9d002c Reviewed-on: https://gerrit.libreoffice.org/49999 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index 38440005..dca3ddfc 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -657,7 +657,11 @@ bool DocumentBroker::load(const std::shared_ptr<ClientSession>& session, const s LOG_INF("SHA1 for DocKey [" << _docKey << "] of [" << localPath << "]: " << Poco::DigestEngine::digestToHex(sha1.digest())); - _uriJailed = Poco::URI(Poco::URI("file://"), localPath); + // LibreOffice can't open files with '#' in the name + std::string localPathEncoded; + Poco::URI::encode(localPath,"#",localPathEncoded); + _uriJailed = Poco::URI(Poco::URI("file://"), localPathEncoded); + _filename = fileInfo._filename; // Use the local temp file's timestamp. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits