1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42:41 +01:00

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
This commit is contained in:
Joshua Spence 2015-01-15 18:00:19 +11:00
parent 1cc81b1d0a
commit 487eb4e916

View file

@ -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(