summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debmetaindex.cc
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2016-12-23 01:29:49 -0800
committerSam Bingner <sam@bingner.com>2019-08-17 12:40:04 -1000
commit2df06b5e275812f665b3532dc1fa22deac8800a9 (patch)
tree3027a4de1134624ee2542fbe0374a8a154af9241 /apt-pkg/deb/debmetaindex.cc
parent3890e62b182147a52487675fd2a054c5fda2617b (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.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index f88076abf..26331291c 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -532,10 +532,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 CheckDate = _config->FindB("Acquire::Check-Date", true);
if (d->CheckDate == metaIndex::TRI_NO)
@@ -565,6 +562,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 StrValidUntil = Section.FindS("Valid-Until");
// if we have a Valid-Until header in the Release file, use it as default