diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2016-12-23 01:29:49 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2016-12-23 01:29:49 -0800 |
commit | 1e33fb4ac68db5c2630de72d222d9dc10eb93272 (patch) | |
tree | d6cfac18e4a891b91c61bf28c87abc480309e25e /apt-pkg/deb/debmetaindex.cc | |
parent | dd47e21814291e965be6da73331f28dc695ce489 (diff) |
Only check for valid Date if checking Valid-Until.
Diffstat (limited to 'apt-pkg/deb/debmetaindex.cc')
-rw-r--r-- | apt-pkg/deb/debmetaindex.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index 8d84409a1..d5afab777 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -448,10 +448,7 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro std::string const StrDate = Section.FindS("Date"); if (RFC1123StrToTime(StrDate.c_str(), Date) == false) - { - _error->Warning( _("Invalid '%s' entry in Release file %s"), "Date", Filename.c_str()); Date = 0; - } bool CheckValidUntil = _config->FindB("Acquire::Check-Valid-Until", true); if (d->CheckValidUntil == metaIndex::TRI_NO) @@ -461,6 +458,9 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro if (CheckValidUntil == true) { + if (Date == 0) + _error->Warning( _("Invalid '%s' entry in Release file %s"), "Date", Filename.c_str()); + std::string const Label = Section.FindS("Label"); std::string const StrValidUntil = Section.FindS("Valid-Until"); |