From c8fe66f3f418c61dbc6f19078a544b1e96555e86 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 26 Mar 2009 11:49:00 -0700 Subject: [PATCH] filepath: leave off / if bare inode (no relative part) --- src/include/filepath.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/include/filepath.h b/src/include/filepath.h index 63d2d8e112a12..040f1a7f621bb 100644 --- a/src/include/filepath.h +++ b/src/include/filepath.h @@ -195,8 +195,11 @@ WRITE_CLASS_ENCODER(filepath) inline ostream& operator<<(ostream& out, const filepath& path) { - if (path.get_ino()) - out << '#' << hex << path.get_ino() << dec << '/'; + if (path.get_ino()) { + out << '#' << hex << path.get_ino() << dec; + if (path.depth()) + out << '/'; + } return out << path.get_path(); } -- 2.39.5