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

Pranav Kant pranavk at collabora.co.uk
Fri Jan 19 07:29:29 UTC 2018


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

New commits:
commit 0547507b671e14b550e2f782cc993ef15010a023
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

diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index d5c8db6b..1227c7fe 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