summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-11-10 16:36:04 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-11-10 16:39:27 +0100
commitff02180ca8abeec0cc1913abf4ad6697d7b25a36 (patch)
treeffa65414a93cb9f031c140ce3042c5581483d00a /apt-pkg
parente40a4a3e381a8cb6c8b924e9ce545512769bddff (diff)
support 'apt build-dep .' (aka: without /)
Reported-By: Christoph Berg (Myon) on IRC
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/sourcelist.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index 0da687895..df2e0b46d 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -619,7 +619,7 @@ bool pkgSourceList::AddVolatileFile(std::string const &File)
void pkgSourceList::AddVolatileFiles(CommandLine &CmdL, std::vector<std::string> * 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] == '.' && I[2] == '/') || I[1] == '/'))))
+ if (I != nullptr && (I[0] == '/' || (I[0] == '.' && (I[1] == '\0' || (I[1] == '.' && (I[2] == '\0' || I[2] == '/')) || I[1] == '/'))))
{
if (AddVolatileFile(I, VolatileCmdL))
;
@@ -633,7 +633,7 @@ void pkgSourceList::AddVolatileFiles(CommandLine &CmdL, std::vector<std::string>
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] == '.' && I[2] == '/') || I[1] == '/'))))
+ if (I != nullptr && (I[0] == '/' || (I[0] == '.' && (I[1] == '\0' || (I[1] == '.' && (I[2] == '\0' || I[2] == '/')) || I[1] == '/'))))
{
if (AddVolatileFile(I))
{