From 46dafa9660bb593068c6ffadea00599dda414ad3 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Thu, 28 Apr 2016 21:22:48 -0600 Subject: [PATCH] Check to make sure directory does not exist before using mkdir. --- app/voicemails/app_defaults.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/voicemails/app_defaults.php b/app/voicemails/app_defaults.php index 6987fef7c6..057d4ac770 100644 --- a/app/voicemails/app_defaults.php +++ b/app/voicemails/app_defaults.php @@ -88,7 +88,9 @@ if ($domains_processed == 1) { $voicemails = $prep_statement->fetchAll(PDO::FETCH_ASSOC); foreach ($voicemails as $row) { $path = $_SESSION['switch']['voicemail']['dir'].'/default/'.$row['domain_name'].'/'.$row['voicemail_id']; - mkdir($path, 0777, true); + if (!file_exists($path)) { + mkdir($path, 0777, true); + } } unset ($prep_statement, $sql);