summaryrefslogtreecommitdiff
path: root/methods/ftp.cc
diff options
context:
space:
mode:
authorbubulle@debian.org <>2006-05-10 20:27:12 +0200
committerbubulle@debian.org <>2006-05-10 20:27:12 +0200
commitfa7733bcf513215a5e8cbd6d9be3d867444b5f1e (patch)
treedaf6265a900f471c65c411b89e195808228ab90e /methods/ftp.cc
parent7bbc5183958e2cb5989a45ba3bf04eacd07c6534 (diff)
parent41ca14b3108dbb7b01d1adceee857b52bc955bd5 (diff)
Sync with Michael
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;
}