From: Igor Fedotov Date: Mon, 29 Oct 2018 18:14:32 +0000 (+0300) Subject: os/bluestore: omit redundant '/' in OSD path for ceph-bluestore-tool if X-Git-Tag: v14.1.0~1037^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5d6b25c3c9f39b96901028e42939b6032392572e;p=ceph.git os/bluestore: omit redundant '/' in OSD path for ceph-bluestore-tool if needed. Signed-off-by: Igor Fedotov --- diff --git a/src/os/bluestore/bluestore_tool.cc b/src/os/bluestore/bluestore_tool.cc index 6268a0822eb4..14b4a3624c05 100644 --- a/src/os/bluestore/bluestore_tool.cc +++ b/src/os/bluestore/bluestore_tool.cc @@ -262,7 +262,10 @@ int main(int argc, char **argv) std::cerr << e.what() << std::endl; exit(EXIT_FAILURE); } - + // normalize path (remove ending '/' if any) + if (path.size() > 1 && *(path.end() - 1) == '/') { + path.resize(path.size() - 1); + } if (vm.count("help")) { usage(po_all); exit(EXIT_SUCCESS);