From ff630e3f7cc6794cb70cca5d5c1aa81e296c4c6f Mon Sep 17 00:00:00 2001 From: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com> Date: Tue, 22 Nov 2022 14:04:44 +0100 Subject: [PATCH] Update src/Storages/NamedCollectionUtils.cpp Co-authored-by: Antonio Andelic --- src/Storages/NamedCollectionUtils.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Storages/NamedCollectionUtils.cpp b/src/Storages/NamedCollectionUtils.cpp index 75d5aace664..204fab36536 100644 --- a/src/Storages/NamedCollectionUtils.cpp +++ b/src/Storages/NamedCollectionUtils.cpp @@ -278,12 +278,7 @@ public: bool removeIfExists(const std::string & collection_name) { auto collection_path = getMetadataPath(collection_name); - if (fs::exists(collection_path)) - { - fs::remove(collection_path); - return true; - } - return false; + return !fs::remove(collection_path); } private: