aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-05-27 19:31:50 -0400
committerBoris Kolpackov <boris@codesynthesis.com>2013-05-27 19:33:09 -0400
commit7625f2083f23707c3ec6f7c5df6dbe364481f9ad (patch)
tree9955bc3ec930108c16bb6eb79b1b51e3bc427d3e
parentd4cbe214123574469ccdefdfe2e4ef51526b9606 (diff)
Fix bug in default options file search logic
-rw-r--r--odb/odb.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/odb/odb.cxx b/odb/odb.cxx
index 93927b8..6ded92f 100644
--- a/odb/odb.cxx
+++ b/odb/odb.cxx
@@ -233,6 +233,7 @@ main (int argc, char* argv[])
//
if (file.relative ())
{
+ bool found (false);
path dd (driver_path (path (argv[0])).directory ());
for (path d (dd);; d = d.directory ())
@@ -244,6 +245,7 @@ main (int argc, char* argv[])
if (stat (f.string ().c_str (), &s) == 0 && S_ISREG (s.st_mode))
{
file = f;
+ found = true;
break;
}
@@ -251,8 +253,8 @@ main (int argc, char* argv[])
break;
}
- if (file.relative ())
- file = dd / file;
+ if (!found)
+ file = dd / file; // For diagnostics.
}
int ac (3);