]> git.saurik.com Git - apt.git/blobdiff - methods/ftp.cc
Add a GetListOfFilesInDir() helper method which replaces the old
[apt.git] / methods / ftp.cc
index c91600ad5388f7cc675922ce731e37ad43faf59e..3e1725823d9a16e98b20adcfe73434723d79cbde 100644 (file)
@@ -19,6 +19,7 @@
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/hashes.h>
+#include <apt-pkg/netrc.h>
 
 #include <sys/stat.h>
 #include <sys/time.h>
@@ -982,7 +983,9 @@ bool FtpMethod::Fetch(FetchItem *Itm)
    FetchResult Res;
    Res.Filename = Itm->DestFile;
    Res.IMSHit = false;
-   
+
+   maybe_add_auth (Get, _config->FindFile("Dir::Etc::netrc"));
+
    // Connect to the server
    if (Server == 0 || Server->Comp(Get) == false)
    {