summaryrefslogtreecommitdiff
path: root/methods/ftp.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-07-03 18:33:31 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-07-03 18:33:31 +0200
commitb7952f4b67d7021dc912aed5f38bc45f03bfc064 (patch)
tree5d18c4268786a05df634be6dbf3a68a2d0f282b6 /methods/ftp.cc
parentc833c7a16381c383588265bbb35ed24ad383b53f (diff)
parentc64d1644ae0fd1af92c80a91a6c17b57f0b8f313 (diff)
* merged with apts mainline
Diffstat (limited to 'methods/ftp.cc')
-rw-r--r--methods/ftp.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/methods/ftp.cc b/methods/ftp.cc
index f595e0ca4..0c2aa00a7 100644
--- a/methods/ftp.cc
+++ b/methods/ftp.cc
@@ -1055,9 +1055,12 @@ bool FtpMethod::Fetch(FetchItem *Itm)
UBuf.modtime = FailTime;
utime(FailFile.c_str(),&UBuf);
- // If the file is missing we hard fail otherwise transient fail
- if (Missing == true)
+ // If the file is missing we hard fail and delete the destfile
+ // otherwise transient fail
+ if (Missing == true) {
+ unlink(FailFile.c_str());
return false;
+ }
Fail(true);
return true;
}