summaryrefslogtreecommitdiff
path: root/methods/ftp.cc
diff options
context:
space:
mode:
authorMichael Vogt <egon@bottom>2006-05-08 18:45:43 +0200
committerMichael Vogt <egon@bottom>2006-05-08 18:45:43 +0200
commitcfde4904a7b61e2a3c75322a08a6fac3c062d65d (patch)
tree83295f359aa7054578e4e776f0fe22f294f6f5d2 /methods/ftp.cc
parent75e94aee76df0256eea7fbd8558437b93af28347 (diff)
parentfc5f54175a514c31c9400d9f9d08e6496cf63823 (diff)
* merged from 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;
}