Explorar el Código

apt-pkg/acquire-item.cc: Use stat buffer if stat was
successful, not if it failed (Closes: #620546)

Julian Andres Klode hace 15 años
padre
commit
3a1f49c42a
Se han modificado 2 ficheros con 8 adiciones y 1 borrados
  1. 1 1
      apt-pkg/acquire-item.cc
  2. 7 0
      debian/changelog

+ 1 - 1
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;

+ 7 - 0
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 <jak@debian.org>  Sat, 02 Apr 2011 20:55:35 +0200
+
 apt (0.8.13) unstable; urgency=low
 
   [ Thorsten Spindler ]