]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: fix md_config_t::get_cluster_name
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Wed, 12 Aug 2020 13:36:31 +0000 (13:36 +0000)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Wed, 28 Oct 2020 09:55:20 +0000 (09:55 +0000)
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 <lpetrut@cloudbasesolutions.com>
src/common/config.cc

index 1f61395283ecfd24b51f5292d0136ed1b6b485d4..c2bfd754674d8416c16623bcd039f1a57cef13e7 100644 (file)
@@ -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