Upgraded to Symfony 2.1-beta2
This commit is contained in:
@@ -184,7 +184,19 @@ class ProxyFactory
|
||||
|
||||
$file = str_replace($placeholders, $replacements, $file);
|
||||
|
||||
file_put_contents($fileName, $file, LOCK_EX);
|
||||
$parentDirectory = dirname($fileName);
|
||||
|
||||
if ( ! is_dir($parentDirectory)) {
|
||||
if (false === @mkdir($parentDirectory, 0775, true)) {
|
||||
throw ProxyException::proxyDirectoryNotWritable();
|
||||
}
|
||||
} else if ( ! is_writable($parentDirectory)) {
|
||||
throw ProxyException::proxyDirectoryNotWritable();
|
||||
}
|
||||
|
||||
$tmpFileName = $fileName . '.' . uniqid("", true);
|
||||
file_put_contents($tmpFileName, $file);
|
||||
rename($tmpFileName, $fileName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user