]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/indexcopy.cc
fail in CopyFile if the FileFds have error flag set
[apt.git] / apt-pkg / indexcopy.cc
index 0e36b3ded7cbf60d4f8d5cc3a75dfe85344863ff..1d61b974d3c0f3edbeef0a3b086b03d295935a93 100644 (file)
@@ -544,11 +544,9 @@ bool SigVerify::CopyMetaIndex(string CDROM, string CDName,         /*{{{*/
       FileFd Rel;
       Target.Open(TargetF,FileFd::WriteAtomic);
       Rel.Open(prefix + file,FileFd::ReadOnly);
-      if (_error->PendingError() == true)
-        return false;
       if (CopyFile(Rel,Target) == false)
-        return false;
-   
+        return _error->Error("Copying of '%s' for '%s' from '%s' failed", file.c_str(), CDName.c_str(), prefix.c_str());
+
       return true;
 }
                                                                        /*}}}*/