[Libreoffice-commits] online.git: loolwsd/PrisonerSession.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Sun May 29 16:48:28 UTC 2016
loolwsd/PrisonerSession.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
New commits:
commit c4ae6da86fe821ee8826861167b695a7fd200577
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sun May 29 12:00:09 2016 -0400
loolwsd: bccu#1687 - leaking loolkit processes
When conversion fails we still have to put
something in the save-as queue to avoid
hanging WSD forever.
Reviewed-on: https://gerrit.libreoffice.org/25618
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
(cherry picked from commit 0c6887c744fcd811728de43a971ee9c964d86e8e)
Change-Id: Ibc518bc922ee40f579a71e07571b21d9e633d998
Reviewed-on: https://gerrit.libreoffice.org/25623
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/PrisonerSession.cpp b/loolwsd/PrisonerSession.cpp
index 2a2fb8a..487fb7f 100644
--- a/loolwsd/PrisonerSession.cpp
+++ b/loolwsd/PrisonerSession.cpp
@@ -135,7 +135,16 @@ bool PrisonerSession::_handleInput(const char *buffer, int length)
{
// Rewrite file:// URLs, as they are visible to the outside world.
const Path path(_docBroker->getJailRoot(), url.substr(filePrefix.length()));
- url = filePrefix + path.toString().substr(1);
+ if (Poco::File(path).exists())
+ {
+ url = filePrefix + path.toString().substr(1);
+ }
+ else
+ {
+ // Blank for failure.
+ Log::debug("SaveAs produced no output, producing blank url.");
+ url.clear();
+ }
}
peer->setSaveAsUrl(url);
More information about the Libreoffice-commits
mailing list