Commit 9159307d authored by Bernhard Link's avatar Bernhard Link

Work around strangeness (bug?) in http-aptmethod about files already there

parent f1126a3e
......@@ -861,6 +861,9 @@ static retvalue senddata(struct aptmethod *method) {
method->alreadywritten = 0;
// TODO: make sure this is already checked for earlier...
assert(index(method->nexttosend->uri,'\n')==NULL || index(method->nexttosend->filename,'\n') == 0);
/* http-aptmethod seems to loose the last byte if the file is already
* in place, so we better unlink the target first... */
unlink(method->nexttosend->filename);
method->command = mprintf(
"600 URI Acquire\nURI: %s\nFilename: %s\n\n",
method->nexttosend->uri,method->nexttosend->filename);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment