Skip to content
Snippets Groups Projects
Commit fc8766cb authored by deuce's avatar deuce
Browse files

Handle glob() failure in getdirsize().

--coverity
parent f39db9aa
No related branches found
No related tags found
No related merge requests found
......@@ -316,7 +316,8 @@ long DLLCALL getdirsize(const char* path, BOOL include_subdirs, BOOL subdir_only
SAFECOPY(match,path);
backslash(match);
SAFECAT(match,ALLFILES);
glob(match,GLOB_MARK,NULL,&g);
if (glob(match,GLOB_MARK,NULL,&g) != 0)
return 0;
if(include_subdirs && !subdir_only)
count=g.gl_pathc;
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment