Added some new stuff.
[core.git] / inc / classes / main / file_directories / directory / class_FrameworkDirectoryPointer.php
index 1cc296ca2a72761fd546ba2a6b5e07795dd75be9..b855a62c52e820f63f4b6806f4a3c92d22c3582a 100644 (file)
@@ -128,9 +128,6 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
                // Can the next entry be read?
                assert($this->getDirectoryIteratorInstance()->valid());
 
-               // Default is FALSE
-               $currentEntry = FALSE;
-
                // Read data from the directory pointer and return it
                $currentEntry = $this->getDirectoryIteratorInstance()->current();
 
@@ -153,6 +150,7 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
                        return $this->readRawDirectory();
                } elseif (!$this->getDirectoryIteratorInstance()->valid()) {
                        // No more left to read
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: EOD reached.');
                        return NULL;
                }
 
@@ -167,10 +165,10 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework
                if (is_object($currentEntry)) {
                        // Get file name
                        $rawLine = $currentEntry->getFilename();
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: rawLine[' . gettype($rawLine) . ']=' . $rawLine);
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: rawLine[' . gettype($rawLine) . ']=' . $rawLine . ',isDot=' . intval($this->getDirectoryIteratorInstance()->isDot()));
 
-                       // Is it not excluded?
-                       if (in_array($rawLine, $except)) {
+                       // Is it a dot-directory or excluded?
+                       if (($this->getDirectoryIteratorInstance()->isDot()) || (in_array($rawLine, $except))) {
                                // To next entry
                                $this->getDirectoryIteratorInstance()->next();