Skip to content

Commit

Permalink
Fixed directories containing s dot (.), not matched in the directory …
Browse files Browse the repository at this point in the history
…search.
  • Loading branch information
exygyscott committed Mar 21, 2014
1 parent 29bfb01 commit b0cfb5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion theme/lib/directory_search.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function get_directories($path, $depth) {
$di = new DirectoryIterator($path);

foreach ($di as $fileinfo) {
if ($fileinfo->isDir() && !$fileinfo->isDot() && strpos($fileinfo->getFilename(), '.') === false) {
if ($fileinfo->isDir() && !$fileinfo->isDot() && strpos($fileinfo->getFilename(), '.') !== 0) {
$relative_path = preg_replace('~^' . preg_quote($this->root) . '[\/\\\]?~', '', $fileinfo->getPathName());

$relative_path = str_replace($this->root . DIRECTORY_SEPARATOR, '', $fileinfo->getPathName());
Expand Down

0 comments on commit b0cfb5e

Please sign in to comment.