[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Tue Apr 28 01:53:40 UTC 2020


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

New commits:
commit 762ca3d3ed613da7a3132192fe535233e1547a9e
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Fri Apr 10 09:36:43 2020 -0400
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Tue Apr 28 03:53:22 2020 +0200

    wsd: don't reset modified flag on storing the doc
    
    The modified flag should only be changed by Core,
    otherwise, we suffer a race and really make the
    significance of this flag ambiguous.
    
    Change-Id: I1fef90f377f9e3ae66b9046c99a428e5ce46e536
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92100
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index d9fc339c9..fd1dc7f46 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -984,7 +984,7 @@ bool DocumentBroker::saveToStorageInternal(const std::string& sessionId, bool su
         const auto timeInSec = std::chrono::duration_cast<std::chrono::seconds>
                                             (std::chrono::system_clock::now() - _lastFileModifiedTime);
         LOG_DBG("Skipping unnecessary saving to URI [" << uriAnonym << "] with docKey [" << _docKey <<
-                "]. File last modified " << timeInSec.count() << " seconds ago.");
+                "]. File last modified " << timeInSec.count() << " seconds ago, timestamp unchanged.");
         _poll->wakeup();
         return true;
     }
@@ -1005,7 +1005,6 @@ bool DocumentBroker::saveToStorageInternal(const std::string& sessionId, bool su
         if (!isSaveAs && !isRename)
         {
             // Saved and stored; update flags.
-            setModified(false);
             _lastFileModifiedTime = newFileModifiedTime;
             _lastSaveTime = std::chrono::steady_clock::now();
 
@@ -2013,6 +2012,7 @@ void DocumentBroker::setModified(const bool value)
 #endif
     }
 
+    // Set the X-LOOL-WOPI-IsModifiedByUser header flag sent to storage.
     _storage->setUserModified(value);
 }
 


More information about the Libreoffice-commits mailing list