From: Lucian Petrut Date: Wed, 12 Aug 2020 13:36:31 +0000 (+0000) Subject: common: fix md_config_t::get_cluster_name X-Git-Tag: v16.1.0~652^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=42b69e263d450c3d3d9da5600c27062fbcab6e8b;p=ceph.git common: fix md_config_t::get_cluster_name Mingw complains about not being able to convert std::filesystem::path::stem to std::string, so we'll need to explicitly retrurn a string. Signed-off-by: Lucian Petrut --- diff --git a/src/common/config.cc b/src/common/config.cc index 1f61395283e..c2bfd754674 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -461,7 +461,7 @@ std::string md_config_t::get_cluster_name(const char* conffile) // If cluster name is not set yet, use the prefix of the // basename of configuration file as cluster name. if (fs::path path{conffile}; path.extension() == ".conf") { - return path.stem(); + return path.stem().string(); } else { // If the configuration file does not follow $cluster.conf // convention, we do the last try and assign the cluster to