Description: this patch adds an useful error message in case of dir open failure.
Index: boinc/lib/filesys.cpp
===================================================================
--- boinc.orig/lib/filesys.cpp
+++ boinc/lib/filesys.cpp
@@ -145,7 +145,12 @@ DIRREF dir_open(const char* p) {
     dirp->handle = INVALID_HANDLE_VALUE;
 #else
     dirp = opendir(p);
-    if (!dirp) return NULL;
+    if (!dirp) {
+        char b[MAXPATHLEN+1];
+        boinc_getcwd(b);
+        fprintf(stderr,"dir_open: Could not open directory '%s' from '%s'.\n",p,b);
+        return NULL;
+    }
 #endif
     return dirp;
 }
@@ -760,7 +765,7 @@
     //
     int retval = rename(old, newf);
     if (retval) {
-        char buf[MAXPATHLEN+MAXPATHLEN];
+        char buf[MAXPATHLEN+MAXPATHLEN+1+7];
         snprintf(buf, sizeof(buf), "mv \"%s\" \"%s\"", old, newf);
 #ifdef __APPLE__
         // system() is deprecated in Mac OS 10.10.
