[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - kit/ChildSession.cpp
mert (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 18 21:07:12 UTC 2020
kit/ChildSession.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit a733718ac40a090ea77d8cfd48a6514b6c16b527
Author: mert <mert.tumer at collabora.com>
AuthorDate: Thu Jun 18 20:30:56 2020 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 18 23:06:53 2020 +0200
Fix insert local image for online
Change-Id: I4edde45cb6c36c5f52b34ac23692c10ef7a5148f
Signed-off-by: mert <mert.tumer at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96623
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar at collabora.com>
(cherry picked from commit d29c986e6ad8f30abc1975c945bad62bc75d89f7)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96635
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 7e2a84e0d..4b27da4c8 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -1194,7 +1194,15 @@ bool ChildSession::insertFile(const char* /*buffer*/, int /*length*/, const Stri
#if !MOBILEAPP
if (type == "graphic" || type == "selectbackground")
- url = "file://" + std::string(JAILED_DOCUMENT_ROOT) + "insertfile/" + name;
+ {
+ std::string jailDoc = JAILED_DOCUMENT_ROOT;
+ if (NoCapsForKit)
+ {
+ jailDoc = Poco::URI(getJailedFilePath()).getPath();
+ jailDoc = jailDoc.substr(0, jailDoc.find(JAILED_DOCUMENT_ROOT)) + JAILED_DOCUMENT_ROOT;
+ }
+ url = "file://" + jailDoc + "insertfile/" + name;
+ }
else if (type == "graphicurl")
URI::decode(name, url);
#else
More information about the Libreoffice-commits
mailing list