aboutsummaryrefslogtreecommitdiff
path: root/bdep/project.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-03-14 14:31:03 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-03-14 14:31:03 +0200
commitc8f2a2c0776aee57af6af10d4a0128befbc1fdeb (patch)
tree265d9393e48c7b49237d40d7a4386fe175dd028a /bdep/project.cxx
parentcc7216e60cd6893974e687599682c5e6233e9b69 (diff)
Fix bug in find_project_packages() logic
Diffstat (limited to 'bdep/project.cxx')
-rw-r--r--bdep/project.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/bdep/project.cxx b/bdep/project.cxx
index ebc466c..e09371e 100644
--- a/bdep/project.cxx
+++ b/bdep/project.cxx
@@ -136,7 +136,8 @@ namespace bdep
// Ignore errors when checking for file existence since we may be
// iterating over directories past any reasonable project boundaries.
//
- if (exists (d / manifest_file, true))
+ bool p (exists (d / manifest_file, true));
+ if (p)
{
if (pkg)
{
@@ -154,10 +155,15 @@ namespace bdep
// Check for the database file first since an (initialized) simple
// project mosl likely won't have any *.manifest files.
//
- if (exists (d / bdep_file, true) ||
- exists (d / packages_file, true) ||
- exists (d / repositories_file, true) ||
- exists (d / configurations_file, true))
+ if (exists (d / bdep_file, true) ||
+ exists (d / packages_file, true) ||
+ //
+ // We should only consider {repositories,configurations}.manifest if
+ // we have either packages.manifest or manifest (i.e., this is a
+ // valid project root).
+ //
+ (p && (exists (d / repositories_file, true) ||
+ exists (d / configurations_file, true))))
{
prj = move (d);
break;