]> git.saurik.com Git - apt.git/blobdiff - methods/ftp.cc
respect user pinning in M-A:same version (un)screwing
[apt.git] / methods / ftp.cc
index d84a194ca3b4c3b72bed6d654cdf45ceeb6a68e5..a8bc95938f5c47ad2341de40f809a50c1ff8dd34 100644 (file)
@@ -950,7 +950,7 @@ bool FTPConn::Get(const char *Path,FileFd &To,unsigned long long Resume,
 // FtpMethod::FtpMethod - Constructor                                  /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-FtpMethod::FtpMethod() : pkgAcqMethod("1.0",SendConfig)
+FtpMethod::FtpMethod() : aptMethod("ftp","1.0",SendConfig)
 {
    signal(SIGTERM,SigTerm);
    signal(SIGINT,SigTerm);
@@ -985,13 +985,10 @@ void FtpMethod::SigTerm(int)
 /* We stash the desired pipeline depth */
 bool FtpMethod::Configuration(string Message)
 {
-   if (pkgAcqMethod::Configuration(Message) == false)
+   if (aptMethod::Configuration(Message) == false)
       return false;
-   
-   TimeOut = _config->FindI("Acquire::Ftp::Timeout",TimeOut);
 
-   // no more active ftp, sorry
-   DropPrivsOrDie();
+   TimeOut = _config->FindI("Acquire::Ftp::Timeout",TimeOut);
 
    return true;
 }
@@ -1090,7 +1087,7 @@ bool FtpMethod::Fetch(FetchItem *Itm)
         // If the file is missing we hard fail and delete the destfile
         // otherwise transient fail
         if (Missing == true) {
-           unlink(FailFile.c_str());
+           RemoveFile("ftp", FailFile);
            return false;
         }
         Fail(true);