Remaining poco

This commit is contained in:
kssenii 2021-05-14 10:06:38 +03:00
parent f33a517d33
commit db849eb3e5
2 changed files with 4 additions and 2 deletions

View File

@ -301,6 +301,8 @@ inline String fullPath(const DiskPtr & disk, const String & path)
/// Return parent path for the specified path.
inline String parentPath(const String & path)
{
if (path.ends_with('/'))
return fs::path(path).parent_path().parent_path() / "";
return fs::path(path).parent_path() / "";
}

View File

@ -40,8 +40,8 @@ std::set<std::string> ExternalLoaderXMLConfigRepository::getAllLoadablesDefiniti
if (pattern[0] != '/')
{
const auto app_config_path = main_config.getString("config-file", "config.xml");
const auto config_dir = Poco::Path{app_config_path}.parent().toString();
const auto absolute_path = config_dir + pattern;
const String config_dir = fs::path(app_config_path).parent_path();
const String absolute_path = fs::path(config_dir) / pattern;
Poco::Glob::glob(absolute_path, files, 0);
if (!files.empty())
continue;