Update src/Storages/NamedCollectionUtils.cpp

Co-authored-by: Antonio Andelic <antonio2368@users.noreply.github.com>
This commit is contained in:
Kseniia Sumarokova 2022-11-22 14:04:44 +01:00 committed by GitHub
parent 1073626f8e
commit ff630e3f7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: