DestFile = _config->FindDir("Dir::State::lists") + "partial/";
DestFile += URItoFileName(URI);
+ // remove any partial downloaded sig-file. it may confuse proxies
+ // and is too small to warrant a partial download anyway
+ unlink(DestFile.c_str());
+
// Create the item
Desc.Description = URIDesc;
Desc.Owner = this;
/* The only header we use is the last-modified header. */
string pkgAcqMetaSig::Custom600Headers()
{
- string Final = _config->FindDir("Dir::State::lists");
- Final += URItoFileName(RealURI);
-
struct stat Buf;
- if (stat(Final.c_str(),&Buf) != 0)
+ if (stat(DestFile.c_str(),&Buf) != 0)
return "\nIndex-File: true";
return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
unlink(Final.c_str());
- // if we debug leave the sig-file in partial/ to see what went wrong
- // else delete it
- if (!_config->FindB("Debug::pkgAcquire::Auth", false)) {
-
- Final = _config->FindDir("Dir::State::lists") + "partial/"+ URItoFileName(RealURI);
- unlink(Final.c_str());
- }
-
-
// queue a pkgAcqMetaIndex with no sigfile
new pkgAcqMetaIndex(Owner, MetaIndexURI, MetaIndexURIDesc, MetaIndexShortDesc,
"", IndexTargets, MetaIndexParser);