]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debsrcrecords.cc
merge segfault fix from Mario Sanchez Prada, many thanks
[apt.git] / apt-pkg / deb / debsrcrecords.cc
index 2f87c767b1318d697f2ec875a7f85a125e2c9ac9..bde10aa6dbb71ac8598e90cb24a37453d9fbf3bb 100644 (file)
@@ -135,9 +135,15 @@ bool debSrcRecordParser::Files(vector<pkgSrcRecords::File> &List)
         string::size_type Tmp = F.Path.rfind('.',Pos);
         if (Tmp == string::npos)
            break;
         string::size_type Tmp = F.Path.rfind('.',Pos);
         if (Tmp == string::npos)
            break;
+        if (F.Type == "tar") {
+           // source v3 has extension 'debian.tar.*' instead of 'diff.*'
+           if (string(F.Path, Tmp+1, Pos-Tmp) == "debian")
+              F.Type = "diff";
+           break;
+        }
         F.Type = string(F.Path,Tmp+1,Pos-Tmp);
         
         F.Type = string(F.Path,Tmp+1,Pos-Tmp);
         
-        if (F.Type == "gz" || F.Type == "bz2" || F.Type == "lzma")
+        if (F.Type == "gz" || F.Type == "bz2" || F.Type == "lzma" || F.Type == "tar")
         {
            Pos = Tmp-1;
            continue;
         {
            Pos = Tmp-1;
            continue;