From: David Kalnischkies Date: Sat, 23 Jul 2016 13:24:46 +0000 (+0200) Subject: call flush on the wrapped writebuffered FileFd X-Git-Tag: 1.2.15~31 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/689857bec8c01a222d2ce0369a13994920c9155b call flush on the wrapped writebuffered FileFd The flush call is a no-op in most FileFd implementations so this isn't as critical as it might sound as the only non-trivial implementation is in the buffered writer, which tends not be used to buffer another buffer… (cherry picked from commit 8ca481e8419c19b6ef9074b68cc028177a507161) --- diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index ef88f6fdd..b041ef131 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1258,9 +1258,8 @@ public: writebuffer.bufferstart += written; } - writebuffer.reset(); - return true; + return wrapped->InternalFlush(); } virtual ssize_t InternalWrite(void const * const From, unsigned long long const Size) APT_OVERRIDE {