wsd/DocumentBroker.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 28ea409a4570be4edfd57aec8a0c779c5d1bd240
Author: Pranav Kant <pran...@collabora.co.uk>
Date:   Thu Feb 1 23:58:43 2018 +0530

    wsd: Don't save if document is unmodified
    
    This also prevents saving the document back to storage.
    
    Without this patch, in case of document conflict (when the document is
    changed behind our back in the storage), the unmodified document end up
    being saved to storage, hence overwriting the document which was changed
    behind our back.
    
    Change-Id: Ie027f5b49c37e7df3f36499e0fef3eca78173969
    Reviewed-on: https://gerrit.libreoffice.org/49114
    Reviewed-by: Ashod Nakashian <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@gmail.com>

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index c499b6e4..a985fe36 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -899,7 +899,7 @@ bool DocumentBroker::autoSave(const bool force)
     {
         LOG_TRC("Sending forced save command for [" << _docKey << "].");
         // Don't terminate editing as this can be invoked by the admin OOM, 
but otherwise force saving anyway.
-        sent = sendUnoSave(savingSessionId, /*dontTerminateEdit=*/ true, 
/*dontSaveIfUnmodified=*/ false, /*isAutosave=*/ false);
+        sent = sendUnoSave(savingSessionId, /*dontTerminateEdit=*/ true, 
/*dontSaveIfUnmodified=*/ true, /*isAutosave=*/ false);
     }
     else if (_isModified)
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to