CID 701957: opendir() NULL returns weren't accounted for.

This commit is contained in:
Philippe Saint-Pierre
2012-07-20 18:31:44 -04:00
parent 8f226f2e87
commit 599150a3fc
+1 -1
View File
@@ -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;