From 8ca481e8419c19b6ef9074b68cc028177a507161 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 23 Jul 2016 15:24:46 +0200 Subject: call flush on the wrapped writebuffered FileFd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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… --- apt-pkg/contrib/fileutl.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index fa0930dff..fc578cd23 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1277,9 +1277,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 { -- cgit v1.2.3