fail in CopyFile if the FileFds have error flag set
[ntk/apt.git] / apt-pkg / indexcopy.cc
index 0e36b3d..1d61b97 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;
 }
                                                                        /*}}}*/