1
0
mirror of synced 2025-01-18 14:31:40 +03:00

ProxyFactory always checks if directory is writable first

This commit is contained in:
Eric Clemmons 2011-10-24 19:45:23 -07:00
parent 99c1383ef5
commit 48bf5022e4

View File

@ -153,7 +153,12 @@ class ProxyFactory
$file = str_replace($placeholders, $replacements, $file);
$parentDirectory = dirname($fileName);
if (! is_dir($parentDirectory) && ! mkdir($parentDirectory, 0775, true)) {
if (! is_dir($parentDirectory)) {
mkdir($parentDirectory, 0775, true);
}
if ( ! is_writable($parentDirectory)) {
throw ProxyException::proxyDirectoryNotWritable();
}