projects
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clarify the --help for 'purge' (LP: #243948)
[apt.git]
/
methods
/
ftp.cc
diff --git
a/methods/ftp.cc
b/methods/ftp.cc
index f595e0ca4c0c41ae904bce696a1ae644faac12e9..554a24cf52c52c19a7ca11a23477a61b934d7bc3 100644
(file)
--- 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);
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;
return false;
+ }
Fail(true);
return true;
}
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);
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";
// Run the http method
string Path = flNotFile(argv[0]) + "http";