Skip to content

Commit

Permalink
Issue #1915088 by openminds, bfroehle: Fixed SkipDotsRecursiveDirecto…
Browse files Browse the repository at this point in the history
…ryIterator not skipping dot-files when they are the first entry.
  • Loading branch information
DavidRothstein committed Mar 30, 2013
1 parent 51755eb commit d9cf661
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

Drupal 7.22, xxxx-xx-xx (development version)
-----------------------
- Fixed a bug which prevented Drupal's file transfer functionality from working
on some PHP 5.4 systems.
- Fixed incorrect log message when theme() is called for a theme hook that does
not exist (minor string change).
- Fixed Drupal's token-replacement system to allow spaces in the token value.
Expand Down
10 changes: 10 additions & 0 deletions includes/filetransfer/filetransfer.inc
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,20 @@ class SkipDotsRecursiveDirectoryIterator extends RecursiveDirectoryIterator {
*/
function __construct($path) {
parent::__construct($path);
$this->skipdots();
}

function rewind() {
parent::rewind();
$this->skipdots();
}

function next() {
parent::next();
$this->skipdots();
}

protected function skipdots() {
while ($this->isDot()) {
parent::next();
}
Expand Down

0 comments on commit d9cf661

Please sign in to comment.