wsd/Storage.cpp | 1 + 1 file changed, 1 insertion(+) New commits: commit 80c8cb4e80bc737ec709fc89e4c31595db37705e Author: Pranav Kant <pran...@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/48816 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp index 47821890..eb158526 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"); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits