]> git.saurik.com Git - apt.git/blobdiff - methods/copy.cc
Disable Mth.DropPrivsOrDie() in copy.cc for now
[apt.git] / methods / copy.cc
index 5570f31c80f467d2416359f3b4ca55efd568dd6e..b65bc4dd5ecc5a926edbc1f34cd0dce81fda52a9 100644 (file)
@@ -55,8 +55,8 @@ void CopyMethod::CalculateHashes(FetchResult &Res)
 /* */
 bool CopyMethod::Fetch(FetchItem *Itm)
 {
-   URI Get = Itm->Uri;
-   std::string File = Get.Path;
+   // this ensures that relative paths work in copy
+   std::string File = Itm->Uri.substr(Itm->Uri.find(':')+1);
 
    // Stat the file and send a start message
    struct stat Buf;
@@ -119,5 +119,6 @@ int main()
    setlocale(LC_ALL, "");
 
    CopyMethod Mth;
+
    return Mth.Run();
 }