diff --git a/src/datasource_cache.cpp b/src/datasource_cache.cpp index 2e30bbd44..6441b2555 100644 --- a/src/datasource_cache.cpp +++ b/src/datasource_cache.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -42,7 +43,6 @@ MAPNIK_DISABLE_WARNING_POP #include #include #include -#include namespace mapnik { @@ -233,8 +233,7 @@ bool datasource_cache::register_datasource(std::string const& filename) namespace x3 = boost::spirit::x3; std::vector handle_names; - namespace fs = std::filesystem; - std::string stem = fs::path(filename).stem(); + std::string stem = fs::path(filename).stem().string(); if (!x3::parse(stem.begin(), stem.end(), +x3::char_("a-zA-Z_") % x3::lit('+'), handle_names)) { MAPNIK_LOG_ERROR(datasource_cache) << "Cannot load '" << filename << "' (Unexpected plugin name)";