From 1996a6a785a54efaeddb4ecf5e88fa6070330182 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 4 Feb 2016 18:00:42 +0100 Subject: Correctly report write errors when flushing buffered writer We cannot just return false without setting an error, as InternalWrite does not set one itself. --- apt-pkg/contrib/fileutl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/contrib/fileutl.cc') 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; } -- cgit v1.2.3