/*}}}*/
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;
void pkgSourceList::AddVolatileFiles(CommandLine &CmdL, std::vector<const char*> * const VolatileCmdL)/*{{{*/
{
std::remove_if(CmdL.FileList + 1, CmdL.FileList + 1 + CmdL.FileSize(), [&](char const * const I) {
- if (I != nullptr && (I[0] == '/' || (I[0] == '.' && I[1] == '/')))
+ if (I != nullptr && (I[0] == '/' || (I[0] == '.' && ((I[1] == '.' && I[2] == '/') || I[1] == '/'))))
{
if (AddVolatileFile(I))
{