Skip to content

Commit

Permalink
Filter out listings better, account for the directory separator
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdejonge committed Jul 7, 2015
1 parent 91074fd commit 258dfa6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public function listContents($directory = '', $recursive = false)
$mapper = function ($entry) use ($directory, $recursive) {
if (
empty($entry['path'])
|| (! empty($directory) && strpos($entry['path'], $directory) === false)
|| (! empty($directory) && strpos($entry['path'], $directory.'/') === false)
|| ($recursive === false && Util::dirname($entry['path']) !== $directory)
) {
return false;
Expand Down

0 comments on commit 258dfa6

Please sign in to comment.