Update src/Disks/ObjectStorages/DiskObjectStorage.cpp

Co-authored-by: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com>
This commit is contained in:
alesapin 2022-05-23 16:02:29 +02:00 committed by GitHub
parent 1a78ea75bb
commit 2064934e59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -423,8 +423,9 @@ void DiskObjectStorage::removeMetadata(const String & path, std::vector<String>
{
for (const auto & [remote_fs_object_path, _] : metadata.remote_fs_objects)
{
paths_to_remove.push_back(fs::path(remote_fs_root_path) / remote_fs_object_path);
object_storage->removeFromCache(fs::path(remote_fs_root_path) / remote_fs_object_path);
String object_path = fs::path(remote_fs_root_path) / remote_fs_object_path;
paths_to_remove.push_back(object_path);
object_storage->removeFromCache(object_path);
}
return false;