Procházet zdrojové kódy

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 před 10 roky
rodič
revize
1996a6a785
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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)
 	 if (written < 0 && errno == EINTR)
 	    continue;
 	    continue;
 	 if (written < 0)
 	 if (written < 0)
-	    return false;
+	    return wrapped->InternalWriteError();
 
 
 	 writebuffer.bufferstart += written;
 	 writebuffer.bufferstart += written;
       }
       }