From b94b5381f68061121c22f2786ba1fa774f1ee6f6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 30 Jul 2016 17:25:23 +0200 Subject: Convert to use canonical directory separators --- bpkg/pkg-disfigure.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'bpkg/pkg-disfigure.cxx') diff --git a/bpkg/pkg-disfigure.cxx b/bpkg/pkg-disfigure.cxx index cb3e657..de9b681 100644 --- a/bpkg/pkg-disfigure.cxx +++ b/bpkg/pkg-disfigure.cxx @@ -72,10 +72,13 @@ namespace bpkg // string bspec; + // Use path representation to get canonical trailing slash. + // + const string& rep (out_root.representation ()); + if (p->state == package_state::configured) { - bspec = "clean('" + out_root.string () + "/') " - "disfigure('" + out_root.string () + "/')"; + bspec = "clean('" + rep + "') " "disfigure('" + rep + "')"; } else { @@ -84,11 +87,10 @@ namespace bpkg // partially configured one. // if (src_root == out_root) - bspec = "disfigure('" + out_root.string () + "/')"; + bspec = "disfigure('" + rep + "')"; else - bspec = "disfigure('" + - src_root.string () + "/'@'" + - out_root.string () + "/')"; + bspec = "disfigure('" + src_root.representation () + "'@'" + + rep + "')"; } l4 ([&]{trace << "buildspec: " << bspec;}); -- cgit v1.1