fix check style

Signed-off-by: neng.liu <neng.liu@kyligence.io>
This commit is contained in:
liuneng1994 2022-01-18 14:12:37 +00:00 committed by neng.liu
parent 15ea37c4ae
commit 5e1e512bf2

View File

@ -72,8 +72,8 @@ namespace
HDFSFileInfo ls;
ls.file_info = hdfsListDirectory(fs.get(), prefix_without_globs.data(), &ls.length);
if (ls.file_info == nullptr && errno != ENOENT) {
// ignore file not found exception, keep throw other exception
if (ls.file_info == nullptr && errno != ENOENT) { // NOLINT
// ignore file not found exception, keep throw other exception, libhdfs3 doesn't have function to get exception type, so use errno.
throw Exception(
ErrorCodes::ACCESS_DENIED, "Cannot list directory {}: {}", prefix_without_globs, String(hdfsGetLastError()));
}