diff --git a/src/Disks/IDisk.h b/src/Disks/IDisk.h index 778b3dc9bf3..34936373d67 100644 --- a/src/Disks/IDisk.h +++ b/src/Disks/IDisk.h @@ -13,6 +13,7 @@ #include #include #include +#include namespace fs = std::filesystem; @@ -289,8 +290,7 @@ inline String fullPath(const DiskPtr & disk, const String & path) /// Return parent path for the specified path. inline String parentPath(const String & path) { - auto fs_path = fs::path(path).parent_path() / ""; - return fs_path.string(); + return Poco::Path(path).parent().toString(); } /// Return file name for the specified path.