[Libreoffice-commits] online.git: Branch 'libreoffice-6-0' - wsd/DocumentBroker.cpp
Andras Timar
andras.timar at collabora.com
Tue Feb 27 11:48:17 UTC 2018
wsd/DocumentBroker.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 337ed208c79ba18d251f003aac6fd3489d4c706f
Author: Andras Timar <andras.timar at 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/49919
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
(cherry picked from commit dde84d17064926f457b6ef7c6ebd9d595ac837b9)
Reviewed-on: https://gerrit.libreoffice.org/50425
Reviewed-by: pranavk <pranavk at collabora.co.uk>
Tested-by: pranavk <pranavk at collabora.co.uk>
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index fad24344..e08be3ae 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -621,7 +621,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.
More information about the Libreoffice-commits
mailing list