From faa74eafecbc2b6d5ffa4e51efc44047131bfb6b Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Tue, 24 Jan 2012 02:54:21 +0000 Subject: [PATCH] Mac: If permissions error because unable to opendir() a subdirectory, show path to that subdirectory svn path=/trunk/boinc/; revision=25132 --- checkin_notes | 7 +++++++ client/check_security.cpp | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index c611923175..e5f75bae76 100644 --- a/checkin_notes +++ b/checkin_notes @@ -922,3 +922,10 @@ David 23 Jan 2012 vda/ vdad.cpp makefile + +Charlie 23 Jan 2012 + - Mac: If permissions error because unable to opendir() a subdirectory, + show path to that subdirectory. + + client/ + check_security.cpp diff --git a/client/check_security.cpp b/client/check_security.cpp index 57e0f08e07..4dbec82881 100644 --- a/client/check_security.cpp +++ b/client/check_security.cpp @@ -514,9 +514,9 @@ static int CheckNestedDirectories(char * basepath, int depth, dirp = opendir(basepath); if (dirp == NULL) // Should never happen - return -1200; + retval = -1200; - while (true) { + while (dirp) { // Skip this if dirp == NULL, else loop until break dp = readdir(dirp); if (dp == NULL) break; // End of list