diff --git a/dbms/src/Storages/MergeTree/MergeTreeDataPart.cpp b/dbms/src/Storages/MergeTree/MergeTreeDataPart.cpp index 35a92bb5a9c..dc3e8e3082f 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeDataPart.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeDataPart.cpp @@ -347,7 +347,7 @@ MergeTreeDataPart::~MergeTreeDataPart() /// "Atomically" remove directory, leaving no inconsistent state. Poco::Path source_path(path); - Poco::Path destination_path(path, "../detached/stale_" + source_path.getBaseName()); + Poco::Path destination_path(source_path.parent(), "detached/stale_" + source_path.getBaseName()); dir.renameTo(destination_path.toString()); dir.remove(true);