Skip to content
This repository has been archived by the owner on Aug 18, 2018. It is now read-only.

Commit

Permalink
If the realpath is empty, something is wrong and we should warn the u…
Browse files Browse the repository at this point in the history
…ser about it
  • Loading branch information
KasperFranz committed Mar 4, 2016
1 parent a79c4f7 commit 4ea4992
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Xinax/LaravelGettext/FileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ public function compileViews(array $viewPaths, $domain)
foreach ($viewPaths as $path) {
$path = $this->basePath . DIRECTORY_SEPARATOR . $path;

if (empty(realpath($path))) {
throw new Exceptions\DirectoryNotFoundException(sprintf(
'The source-path: %s, is not found, please check that it exists, and update your config with the right path.',
$path
));
}

$fs = new \Illuminate\Filesystem\Filesystem($path);
$files = $fs->allFiles(realpath($path));

Expand Down

0 comments on commit 4ea4992

Please sign in to comment.