X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/88a8975f156e452d9f3ebe76822b236e8962ebba..e7edb2fef8370d54a4b8e5a01266e6eda81ef84e:/apt-pkg/indexcopy.cc diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 13eccc8db..4a35e3847 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -31,6 +31,7 @@ #include #include #include +#include #include "indexcopy.h" #include @@ -89,7 +90,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector &List, off_t const FileSize = Pkg.Size(); pkgTagFile Parser(&Pkg); - if (_error->PendingError() == true) + if (Pkg.IsOpen() == false || Pkg.Failed()) return false; // Open the output file @@ -106,7 +107,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector &List, } else { Target.Open(TargetF,FileFd::WriteAtomic); } - if (_error->PendingError() == true) + if (Target.IsOpen() == false || Target.Failed()) return false; // Setup the progress meter @@ -549,7 +550,7 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, if(Debug) cout << "Signature verify for: " << *I << endl; - metaIndex *MetaIndex = new debReleaseIndex("",""); + metaIndex *MetaIndex = new debReleaseIndex("","", {}); string prefix = *I; string const releasegpg = *I+"Release.gpg"; @@ -682,7 +683,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ off_t const FileSize = Pkg.Size(); pkgTagFile Parser(&Pkg); - if (_error->PendingError() == true) + if (Pkg.IsOpen() == false || Pkg.Failed()) return false; // Open the output file @@ -699,7 +700,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ } else { Target.Open(TargetF,FileFd::WriteAtomic); } - if (_error->PendingError() == true) + if (Pkg.IsOpen() == false || Pkg.Failed()) return false; // Setup the progress meter @@ -770,14 +771,14 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ } /*}}}*/ -IndexCopy::IndexCopy() : d(NULL) {} +IndexCopy::IndexCopy() : d(nullptr), Section(nullptr) {} APT_CONST IndexCopy::~IndexCopy() {} PackageCopy::PackageCopy() : IndexCopy(), d(NULL) {} APT_CONST PackageCopy::~PackageCopy() {} SourceCopy::SourceCopy() : IndexCopy(), d(NULL) {} APT_CONST SourceCopy::~SourceCopy() {} -TranslationsCopy::TranslationsCopy() : d(NULL) {} +TranslationsCopy::TranslationsCopy() : d(nullptr), Section(nullptr) {} APT_CONST TranslationsCopy::~TranslationsCopy() {} SigVerify::SigVerify() : d(NULL) {} APT_CONST SigVerify::~SigVerify() {}