File tree Expand file tree Collapse file tree 1 file changed +18
-19
lines changed Expand file tree Collapse file tree 1 file changed +18
-19
lines changed Original file line number Diff line number Diff line change @@ -1992,25 +1992,24 @@ static void ReadDir(const FunctionCallbackInfo<Value>& args) {
19921992
19931993 if (argc > 3 ) { // readdir(path, encoding, withTypes, req)
19941994 FSReqBase* req_wrap_async = GetReqWrap (args, 3 );
1995- if (req_wrap_async != nullptr ) {
1996- ASYNC_THROW_IF_INSUFFICIENT_PERMISSIONS (
1997- env,
1998- req_wrap_async,
1999- permission::PermissionScope::kFileSystemRead ,
2000- path.ToStringView ());
2001- req_wrap_async->set_with_file_types (with_types);
2002- FS_ASYNC_TRACE_BEGIN1 (
2003- UV_FS_SCANDIR, req_wrap_async, " path" , TRACE_STR_COPY (*path))
2004- AsyncCall (env,
2005- req_wrap_async,
2006- args,
2007- " scandir" ,
2008- encoding,
2009- AfterScanDir,
2010- uv_fs_scandir,
2011- *path,
2012- 0 /* flags*/ );
2013- }
1995+ CHECK_NOT_NULL (req_wrap_async);
1996+ ASYNC_THROW_IF_INSUFFICIENT_PERMISSIONS (
1997+ env,
1998+ req_wrap_async,
1999+ permission::PermissionScope::kFileSystemRead ,
2000+ path.ToStringView ());
2001+ req_wrap_async->set_with_file_types (with_types);
2002+ FS_ASYNC_TRACE_BEGIN1 (
2003+ UV_FS_SCANDIR, req_wrap_async, " path" , TRACE_STR_COPY (*path))
2004+ AsyncCall (env,
2005+ req_wrap_async,
2006+ args,
2007+ " scandir" ,
2008+ encoding,
2009+ AfterScanDir,
2010+ uv_fs_scandir,
2011+ *path,
2012+ 0 /* flags*/ );
20142013 } else { // readdir(path, encoding, withTypes)
20152014 THROW_IF_INSUFFICIENT_PERMISSIONS (
20162015 env, permission::PermissionScope::kFileSystemRead , path.ToStringView ());
You can’t perform that action at this time.
0 commit comments