CID 701957: opendir() NULL returns weren't accounted for.
This commit is contained in:
@@ -89,7 +89,7 @@ remove_dir_contents(Path& path, bool force, bool removeAttributes)
|
||||
{
|
||||
// open the dir
|
||||
DIR* dir = opendir(path.GetPath());
|
||||
if (dir < 0) {
|
||||
if (dir == NULL) {
|
||||
fprintf(stderr, "Error: Failed to open dir \"%s\": %s\n",
|
||||
path.GetPath(), strerror(errno));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user