From 3a1f49c42aae17c23d52486db21fb7c05734dbd2 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 2 Apr 2011 21:00:45 +0200 Subject: [PATCH] apt-pkg/acquire-item.cc: Use stat buffer if stat was successful, not if it failed (Closes: #620546) --- apt-pkg/acquire-item.cc | 2 +- debian/changelog | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 2ecb8ed6e..184802ca3 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -841,7 +841,7 @@ string pkgAcqIndex::Custom600Headers() if (ShortDesc().find("Translation") != 0) msg += "\nFail-Ignore: true"; struct stat Buf; - if (stat(Final.c_str(),&Buf) != 0) + if (stat(Final.c_str(),&Buf) == 0) msg += "\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); return msg; diff --git a/debian/changelog b/debian/changelog index c7bb429ff..2dacf93f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +apt (0.8.13.1) unstable; urgency=low + + * apt-pkg/acquire-item.cc: Use stat buffer if stat was + successful, not if it failed (Closes: #620546) + + -- Julian Andres Klode Sat, 02 Apr 2011 20:55:35 +0200 + apt (0.8.13) unstable; urgency=low [ Thorsten Spindler ] -- 2.45.2