]> git.saurik.com Git - apt.git/commitdiff
Correctly report write errors when flushing buffered writer
authorJulian Andres Klode <jak@debian.org>
Thu, 4 Feb 2016 17:00:42 +0000 (18:00 +0100)
committerJulian Andres Klode <jak@debian.org>
Thu, 4 Feb 2016 17:00:42 +0000 (18:00 +0100)
We cannot just return false without setting an error,
as InternalWrite does not set one itself.

apt-pkg/contrib/fileutl.cc

index 8c50874dce782cca4033730e3af5649e5ff605b9..fcdaee644b6d44bf72692b0c922e165b350bd40a 100644 (file)
@@ -1250,7 +1250,7 @@ public:
         if (written < 0 && errno == EINTR)
            continue;
         if (written < 0)
-           return false;
+           return wrapped->InternalWriteError();
 
         writebuffer.bufferstart += written;
       }