From 487eb4e916d24acb9491cecd7ac223850f7bcddc Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Thu, 15 Jan 2015 18:00:19 +1100 Subject: [PATCH] Don't try to create the Aphlict log directory if it already exists Summary: Ref T6944. This was not quite implemented correctly in D11387. Test Plan: Saw no more exceptions about being unable to create `/var/log`. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: maxhodak, Korvin, epriestley Maniphest Tasks: T6944 Differential Revision: https://secure.phabricator.com/D11397 --- .../management/PhabricatorAphlictManagementWorkflow.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php b/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php index 03e03ae254..3766ed22e8 100644 --- a/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php +++ b/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php @@ -39,7 +39,9 @@ abstract class PhabricatorAphlictManagementWorkflow try { $dir = dirname($path); - Filesystem::createDirectory($dir, 0755, true); + if (!Filesystem::pathExists($dir)) { + Filesystem::createDirectory($dir, 0755, true); + } } catch (FilesystemException $ex) { throw new Exception( pht(