Skip to content

Commit

Permalink
[FrameworkBundle] Ignore missing directories in about command
Browse files Browse the repository at this point in the history
  • Loading branch information
ro0NL authored Jun 15, 2023
1 parent 21abbad commit 9f97162
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Command/AboutCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ private static function formatFileSize(string $path): string
if (is_file($path)) {
$size = filesize($path) ?: 0;
} else {
if (!is_dir($path)) {
return 'n/a';
}

$size = 0;
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS | \RecursiveDirectoryIterator::FOLLOW_SYMLINKS)) as $file) {
if ($file->isReadable()) {
Expand Down

0 comments on commit 9f97162

Please sign in to comment.