Skip to content

Instantly share code, notes, and snippets.

@winks
Created July 30, 2010 12:46
Show Gist options
  • Save winks/500438 to your computer and use it in GitHub Desktop.
Save winks/500438 to your computer and use it in GitHub Desktop.
--- /home/useer/code/php-file-iterator/File/Iterator.php 2010-07-30 14:05:33.000000000 +0200
+++ ../File/Iterator.php 2010-07-30 14:45:08.000000000 +0200
@@ -138,12 +138,14 @@
*/
protected function acceptPath($path)
{
- if (is_dir($path)) {
+ if (is_dir(dirname($path))) {
foreach ($this->exclude as $exclude) {
if (strpos($path, $exclude) === 0) {
return FALSE;
}
}
+ } else {
+ return FALSE;
}
return TRUE;
@adrien-mogenet
Copy link

Doesn't work for me... (it seems to be blocking)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment