Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Skip . and .. when generating trees.

Fixes #2012
  • Loading branch information...
commit 155968349f47a67c4af764d40927e47daa5fa738 1 parent 0bcb8d0
@markstory markstory authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  lib/Cake/Utility/Folder.php
View
3  lib/Cake/Utility/Folder.php
@@ -413,6 +413,9 @@ public function tree($path = null, $exceptions = true, $type = null) {
if ($skipHidden && $name[0] === '.' || isset($exceptions[$name])) {
continue;
}
+ if ($name === '.' || $name === '..') {
+ continue;
+ }
if ($item->isFile()) {
$files[] = $item->getPathName();
} else if ($item->isDir()) {
Please sign in to comment.
Something went wrong with that request. Please try again.