diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-30 17:25:23 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-30 17:25:23 +0200 |
commit | b94b5381f68061121c22f2786ba1fa774f1ee6f6 (patch) | |
tree | 887717ac2e585c93141e71509f8779e852c4967d /bpkg/types | |
parent | bee19e051ea565813588a532bfbae4ce0b2f4a71 (diff) |
Convert to use canonical directory separators
Diffstat (limited to 'bpkg/types')
-rw-r--r-- | bpkg/types | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -81,22 +81,10 @@ namespace bpkg using paths = std::vector<path>; using dir_paths = std::vector<dir_path>; - // Custom path printing. + // Custom path printing (with trailing slash for directories). // inline ostream& - operator<< (ostream& os, const path& p) {return os << p.string ();} - - inline ostream& - operator<< (ostream& os, const dir_path& p) - { - const string& s (p.string ()); - os << s; - - if (!s.empty () && !dir_path::traits::is_separator (s.back ())) - os << dir_path::traits::directory_separator; - - return os; - } + operator<< (ostream& os, const path& p) {return os << p.representation ();} } #endif // BPKG_TYPES |