Got rid of ugly relative paths while deleting on destroy.

This commit is contained in:
Vladimir Chebotarev 2020-01-21 15:24:56 +03:00
parent fdef1d6935
commit b35a6d1ce3

View File

@ -347,7 +347,7 @@ MergeTreeDataPart::~MergeTreeDataPart()
/// "Atomically" remove directory, leaving no inconsistent state. /// "Atomically" remove directory, leaving no inconsistent state.
Poco::Path source_path(path); 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.renameTo(destination_path.toString());
dir.remove(true); dir.remove(true);