X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/3573e286ba001ef30f4871f3ed2e17ea905d6404..73fc19d055b20178e5efae08013fe24663f6d89c:/methods/ftp.cc

diff --git a/methods/ftp.cc b/methods/ftp.cc
index f595e0ca4..554a24cf5 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;
       }
@@ -1098,7 +1101,7 @@ int main(int argc,const char *argv[])
 	 char S[300];
 	 snprintf(S,sizeof(S),"http_proxy=%s",getenv("ftp_proxy"));
 	 putenv(S);
-	 putenv("no_proxy=");
+	 putenv((char *)"no_proxy=");
 	 
 	 // Run the http method
 	 string Path = flNotFile(argv[0]) + "http";