Update src/Disks/DiskWebServer.cpp

Co-authored-by: Kruglov Pavel <48961922+Avogar@users.noreply.github.com>
This commit is contained in:
Kseniia Sumarokova 2021-08-24 12:24:54 +03:00 committed by GitHub
parent 14b87feb27
commit d78e551de9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -263,9 +263,7 @@ DiskDirectoryIteratorPtr DiskWebServer::iterateDirectory(const String & path)
throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot extract uuid for: {}", path);
/// Do not throw if it is not a query, but disk load.
bool can_throw = false;
if (CurrentThread::isInitialized() && CurrentThread::get().getQueryContext())
can_throw = true;
bool can_throw = CurrentThread::isInitialized() && CurrentThread::get().getQueryContext();
try
{