From fc5f54175a514c31c9400d9f9d08e6496cf63823 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 8 May 2006 18:31:47 +0200 Subject: * methods/ftp.cc: remove a tried-to-downloaded file if the file is missing on the sever --- methods/ftp.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'methods/ftp.cc') 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; } -- cgit v1.2.3