]> git.saurik.com Git - apt.git/commitdiff
call flush on the wrapped writebuffered FileFd
authorDavid Kalnischkies <david@kalnischkies.de>
Sat, 23 Jul 2016 13:24:46 +0000 (15:24 +0200)
committerJulian Andres Klode <jak@debian.org>
Wed, 31 Aug 2016 12:16:10 +0000 (14:16 +0200)
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)

apt-pkg/contrib/fileutl.cc

index ef88f6fddd73de89526d7643a52aa9d99a266785..b041ef131366feb56722f25dbe1b45c61ad44940 100644 (file)
@@ -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
    {