diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-08-16 17:57:54 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-08-16 17:57:54 +0300 |
commit | 0fb8bc472aafaacb6bff3b9f6a3af2df1aa8dc8a (patch) | |
tree | 067dbb2b5f8fc77ac2caa7715183e8f7f58fc609 /bdep/new.cxx | |
parent | ffdf220f64c7362bf06f8d43aa9820ed4634fdbb (diff) |
Fix uncaught invalid_path exception
Diffstat (limited to 'bdep/new.cxx')
-rw-r--r-- | bdep/new.cxx | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/bdep/new.cxx b/bdep/new.cxx index a69508d..160a9ce 100644 --- a/bdep/new.cxx +++ b/bdep/new.cxx @@ -491,17 +491,17 @@ namespace bdep if (o.package () || o.subdirectory ()) { if (o.directory_specified ()) - (prj = o.directory ()).complete ().normalize (); + prj = normalize (o.directory (), "project"); else prj = current_directory (); out = o.output_dir_specified () ? o.output_dir () : prj / dir_path (n); - out.complete ().normalize (); + normalize (out, "output"); } else { out = o.output_dir_specified () ? o.output_dir () : dir_path (n); - out.complete ().normalize (); + normalize (out, "output"); prj = out; } @@ -2152,19 +2152,15 @@ namespace bdep auto output_parent_dir = [&o] () { - return o.output_dir ().directory ().complete ().normalize (); + return normalize (o.output_dir (), "output"); }; if (o.package () || o.subdirectory ()) { - auto project_dir = [&o] () - { - return dir_path (o.directory ()).complete ().normalize (); - }; - - start_dir = o.output_dir_specified () ? output_parent_dir () : - o.directory_specified () ? project_dir () : - current_directory (); + start_dir = + o.output_dir_specified () ? output_parent_dir () : + o.directory_specified () ? normalize (o.directory (), "project") : + current_directory (); // Get the actual project directory. // |