mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Clearer code based on review
This commit is contained in:
parent
0ddfc3df84
commit
e358a0963c
@ -82,7 +82,9 @@ TEST(ReadBufferAIOTest, TestReadAfterAIO)
|
||||
|
||||
if (file_path[0] != '/')
|
||||
{
|
||||
std::filesystem::remove_all(file_path.substr(0, file_path.size() - 4));
|
||||
const size_t last_slash = file_path.rfind('/');
|
||||
const std::string temp_dir = file_path.substr(0, last_slash);
|
||||
std::filesystem::remove_all(temp_dir);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user