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

Pranav Kant pranavk at collabora.co.uk
Tue Feb 27 11:37:14 UTC 2018


 wsd/Storage.cpp |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 0d8724e6bcb9b3b2b6fa2997c36801a0a2c6ffbb
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Thu Jan 18 20:50:35 2018 +0530

    wsd: Fix incorrect file size reported
    
    Close/flush the file after copying into it so that we can calculate the exact
    filesize later on.
    
    Change-Id: I30aca9d0ac3702394a4465c30c61954a726eec39
    (cherry picked from commit 0547507b671e14b550e2f782cc993ef15010a023)
    Reviewed-on: https://gerrit.libreoffice.org/50426
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index 1ebd28e0..1a4948d4 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -638,6 +638,7 @@ std::string WopiStorage::loadStorageFileToLocal(const Authorization& auth)
             std::copy(std::istreambuf_iterator<char>(rs),
                       std::istreambuf_iterator<char>(),
                       std::ostreambuf_iterator<char>(ofs));
+            ofs.close();
             LOG_INF("WOPI::GetFile downloaded " << getFileSize(_jailedFilePath) << " bytes from [" << uriObject.toString() <<
                     "] -> " << _jailedFilePath << " in " << diff.count() << "s");
 


More information about the Libreoffice-commits mailing list