Apparently, createDir() will return FALSE if the folder already exists *or*
if the creation-act fails. We only want to display a warning if the
creation-act fails.
if ($value) {
$value = CRM_Utils_File::addTrailingSlash($value);
if (isset($this->map[$k][2]) && in_array('mkdir', $this->map[$k][2])) {
- if (!CRM_Utils_File::createDir($value, FALSE)) {
+ if (!is_dir($value) && !CRM_Utils_File::createDir($value, FALSE)) {
CRM_Core_Session::setStatus(ts('Failed to make directory (%1) at "%2". Please update the settings or file permissions.', array(
1 => $k,
2 => $value,