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
|
// open the dir
|
||||||
DIR* dir = opendir(path.GetPath());
|
DIR* dir = opendir(path.GetPath());
|
||||||
if (dir < 0) {
|
if (dir == NULL) {
|
||||||
fprintf(stderr, "Error: Failed to open dir \"%s\": %s\n",
|
fprintf(stderr, "Error: Failed to open dir \"%s\": %s\n",
|
||||||
path.GetPath(), strerror(errno));
|
path.GetPath(), strerror(errno));
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user