[Libreoffice-commits] online.git: Branch 'libreoffice-6-2' - wsd/ClientSession.cpp

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu May 30 22:36:13 UTC 2019


 wsd/ClientSession.cpp |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 56dd06f2cf30de858e800a81f83437ae83f38070
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Thu May 23 17:55:01 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Fri May 31 00:35:54 2019 +0200

    Make renamefile more careful.
    
    Change-Id: If39353fc01ea48d8e0077b228a6281839dde5c87
    Reviewed-on: https://gerrit.libreoffice.org/72877
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 9797d73bb..a1e6c9319 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -217,8 +217,10 @@ bool ClientSession::_handleInput(const char *buffer, int length)
 
         return true;
     }
-    else if (tokens[0] == "versionrestore") {
-        if (tokens[1] == "prerestore") {
+    else if (tokens[0] == "versionrestore")
+    {
+        if (tokens.size() > 1 && tokens[1] == "prerestore")
+        {
             // green signal to WOPI host to restore the version *after* saving
             // any unsaved changes, if any, to the storage
             docBroker->closeDocument("versionrestore: prerestore_ack");


More information about the Libreoffice-commits mailing list