]> git.saurik.com Git - apt.git/commitdiff
rred: If there were I/O errors, fail
authorJulian Andres Klode <jak@debian.org>
Thu, 4 Feb 2016 16:56:27 +0000 (17:56 +0100)
committerJulian Andres Klode <jak@debian.org>
Thu, 4 Feb 2016 16:56:27 +0000 (17:56 +0100)
We basically ignored errors from writing and flushing, let's
not do that.

methods/rred.cc

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