From: Julian Andres Klode Date: Thu, 4 Feb 2016 17:00:42 +0000 (+0100) Subject: Correctly report write errors when flushing buffered writer X-Git-Tag: 1.2.2~3 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/1996a6a785a54efaeddb4ecf5e88fa6070330182 Correctly report write errors when flushing buffered writer We cannot just return false without setting an error, as InternalWrite does not set one itself. --- diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 8c50874dc..fcdaee644 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1250,7 +1250,7 @@ public: if (written < 0 && errno == EINTR) continue; if (written < 0) - return false; + return wrapped->InternalWriteError(); writebuffer.bufferstart += written; }