]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/sourcelist.cc
FileFd: Add a buffered writing mode
[apt.git] / apt-pkg / sourcelist.cc
index 1e6b831be7a7be189e522a18bb658e63706091e8..6773b069fbec507178383ed49a6ec7ca2870278b 100644 (file)
@@ -544,11 +544,17 @@ void pkgSourceList::AddVolatileFile(pkgIndexFile * const File)            /*{{{*/
                                                                        /*}}}*/
 bool pkgSourceList::AddVolatileFile(std::string const &File)           /*{{{*/
 {
+   // Note: FileExists matches directories and links, too!
    if (File.empty() || FileExists(File) == false)
       return false;
 
-   if (flExtension(File) == "deb")
+   std::string const ext = flExtension(File);
+   if (ext == "deb")
       AddVolatileFile(new debDebPkgFileIndex(File));
+   else if (ext == "dsc")
+      AddVolatileFile(new debDscFileIndex(File));
+   else if (FileExists(flCombine(File, "debian/control")))
+      AddVolatileFile(new debDscFileIndex(flCombine(File, "debian/control")));
    else
       return false;