aboutsummaryrefslogtreecommitdiff
path: root/libbutl/path-io.mxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbutl/path-io.mxx')
-rw-r--r--libbutl/path-io.mxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/libbutl/path-io.mxx b/libbutl/path-io.mxx
index 5a91dac..a44d26b 100644
--- a/libbutl/path-io.mxx
+++ b/libbutl/path-io.mxx
@@ -31,16 +31,17 @@ import butl.path;
LIBBUTL_MODEXPORT namespace butl
{
- // This is the default path IO implementation. It is separate to allo custom
- // implementations. For example, we may want to print paths as relative to
- // the working directory. Or we may want to print '~' for the home directory
- // prefix. Or we may want to print dir_path with a trailing '/'.
+ // This is the default path IO implementation. It is separate to allow
+ // custom implementations. For example, we may want to print paths as
+ // relative to the working directory. Or we may want to print '~' for the
+ // home directory prefix. Or we may want to print dir_path with a trailing
+ // '/'.
//
template <typename C, typename K>
inline std::basic_ostream<C>&
operator<< (std::basic_ostream<C>& os, const basic_path<C, K>& p)
{
- return os << p.string ();
+ return to_stream (os, p, false /* representation */);
}
template <typename C, typename P>
@@ -49,6 +50,6 @@ LIBBUTL_MODEXPORT namespace butl
{
assert (!pn.empty ());
- return os << (pn.name ? *pn.name : pn.path->string ());
+ return pn.name ? (os << *pn.name) : (os << *pn.path);
}
}