Minor optimization
This commit is contained in:
parent
4673c74d16
commit
0b4dbf6cc1
1 changed files with 2 additions and 5 deletions
|
@ -43,12 +43,9 @@
|
||||||
{
|
{
|
||||||
$fileInfo = new SplFileInfo($uri);
|
$fileInfo = new SplFileInfo($uri);
|
||||||
|
|
||||||
if(!is_dir($fileInfo->getPath()))
|
if(!is_dir($fileInfo->getPath()) && !mkdir($concurrentDirectory = $fileInfo->getPath(), 0755, true) && !is_dir($concurrentDirectory))
|
||||||
{
|
{
|
||||||
if(!mkdir($concurrentDirectory = $fileInfo->getPath(), 0755, true) && !is_dir($concurrentDirectory))
|
throw new IOException(sprintf('Unable to create directory: (%s)', $fileInfo->getPath()));
|
||||||
{
|
|
||||||
throw new IOException(sprintf('Unable to create directory: (%s)', $fileInfo->getPath()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Console::outDebug(sprintf('writing %s of data to %s', Functions::b2u(strlen($data)), $uri));
|
Console::outDebug(sprintf('writing %s of data to %s', Functions::b2u(strlen($data)), $uri));
|
||||||
|
|
Loading…
Add table
Reference in a new issue