Fixed nested directories

This commit is contained in:
Sys 2021-08-24 13:38:42 +02:00
parent 4f97035bf4
commit 51cfa20983
No known key found for this signature in database
GPG Key ID: 3CD2C29F8AB39BFD
1 changed files with 2 additions and 2 deletions

View File

@ -184,10 +184,10 @@ class TgScraper
{
$result = realpath($path);
if (false === $result) {
if (!mkdir($path)) {
if (!mkdir($path, 0755, true)) {
$path = getcwd() . '/gen';
if (!file_exists($path)) {
mkdir($path, 0755);
mkdir($path, 0755, true);
}
}
}