From efb5db56425245a20df704e707f6a91190eb67f3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 30 Jul 2016 17:34:45 +0200 Subject: Don't use hard-coded directory separators --- butl/path.txx | 4 ++-- tests/process/driver.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/butl/path.txx b/butl/path.txx index 08af340..44c03c3 100644 --- a/butl/path.txx +++ b/butl/path.txx @@ -80,14 +80,14 @@ namespace butl basic_path basic_path:: relative (basic_path d) const { - basic_path r; + dir_type r; for (;; d = d.directory ()) { if (sub (d)) break; - r /= basic_path ("../"); + r /= ".."; // Roots of the paths do not match. // diff --git a/tests/process/driver.cxx b/tests/process/driver.cxx index 18b4fd8..bcf04a7 100644 --- a/tests/process/driver.cxx +++ b/tests/process/driver.cxx @@ -291,7 +291,7 @@ main (int argc, const char* argv[]) // Fail for unexistent file path. // - assert (!exec (path ("./dr"))); + assert (!exec (dir_path (".") / path ("dr"))); // Execute the child using file name having PATH variable being properly set. // -- cgit v1.1