]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: omit redundant '/' in OSD path for ceph-bluestore-tool if 24809/head
authorIgor Fedotov <ifedotov@suse.com>
Mon, 29 Oct 2018 18:14:32 +0000 (21:14 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Mon, 29 Oct 2018 18:14:32 +0000 (21:14 +0300)
needed.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/os/bluestore/bluestore_tool.cc

index 6268a0822eb4e80893dd5399c34f909ff4561b2a..14b4a3624c05ff9d79e4f350506d0192198c426e 100644 (file)
@@ -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);