Explorar o código

Correctly report write errors when flushing buffered writer

We cannot just return false without setting an error,
as InternalWrite does not set one itself.
Julian Andres Klode %!s(int64=10) %!d(string=hai) anos
pai
achega
1996a6a785
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      apt-pkg/contrib/fileutl.cc

+ 1 - 1
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;
       }