Skip to content

Commit

Permalink
Create directory for touch file in case directory not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel kelemen committed Nov 18, 2019
1 parent 602f16d commit f84939d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Bridges/ApplicationDI/PresenterFactoryCallback.php
Expand Up @@ -44,6 +44,10 @@ public function __invoke(string $class): Nette\Application\IPresenter

} elseif (!$services) {
if ($this->touchToRefresh) {
$dir = pathinfo($this->touchToRefresh, PATHINFO_DIRNAME);
if (!file_exists($dir)) {
mkdir($dir, 0777, true);
}
touch($this->touchToRefresh);
}

Expand Down

0 comments on commit f84939d

Please sign in to comment.