Browse Source

rred: If there were I/O errors, fail

We basically ignored errors from writing and flushing, let's
not do that.
Julian Andres Klode 10 years ago
parent
commit
610e13842a
1 changed files with 5 additions and 0 deletions
  1. 5 0
      methods/rred.cc

+ 5 - 0
methods/rred.cc

@@ -660,6 +660,11 @@ class RredMethod : public aptMethod {
 	 out.Close();
 	 out.Close();
 	 inp.Close();
 	 inp.Close();
 
 
+	 if (_error->PendingError() == true) {
+	    std::cerr << "FAILED to read or write files" << std::endl;
+	    return false;
+	 }
+
 	 if (Debug == true) {
 	 if (Debug == true) {
 	    std::clog << "rred: finished file patching of " << Path  << "." << std::endl;
 	    std::clog << "rred: finished file patching of " << Path  << "." << std::endl;
 	 }
 	 }