Skip to content

Commit 9ddc0ef

Browse files
author
Rich Lott
committed
Fix #69. Recursively follow symlinks.
1 parent aedeef1 commit 9ddc0ef

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Version 0.6.1
2+
3+
* Follow symlinks below directories. (Previously only symlinks in the top
4+
directory were followed)
5+
16
Version 0.6.0
27
* Exclude phpctags when re-building phar
38
* Fix typo in README.md

PHPCtags.class.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
class PHPCtags
33
{
4-
const VERSION = '0.6.0';
4+
const VERSION = '0.6.1';
55

66
private $mFile;
77

@@ -514,7 +514,11 @@ public function __toString() {
514514
class ReadableRecursiveDirectoryIterator extends RecursiveDirectoryIterator {
515515
function getChildren() {
516516
try {
517-
return new ReadableRecursiveDirectoryIterator($this->getPathname());
517+
return new ReadableRecursiveDirectoryIterator(
518+
$this->getPathname(),
519+
FilesystemIterator::SKIP_DOTS |
520+
FilesystemIterator::FOLLOW_SYMLINKS);
521+
518522
} catch(UnexpectedValueException $e) {
519523
file_put_contents('php://stderr', "\nPHPPCtags: {$e->getMessage()} - {$this->getPathname()}\n");
520524
return new RecursiveArrayIterator(array());

tests/Acceptance/AcceptanceTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected function assertTagsFileHeaderIsCorrect()
122122
"!_TAG_PROGRAM_AUTHOR\ttechlivezheng\t/techlivezheng@gmail.com/",
123123
"!_TAG_PROGRAM_NAME\tphpctags\t//",
124124
"!_TAG_PROGRAM_URL\thttps://github.com/techlivezheng/phpctags\t/official site/",
125-
"!_TAG_PROGRAM_VERSION\t0.6.0\t//",
125+
"!_TAG_PROGRAM_VERSION\t0.6.1\t//",
126126
);
127127

128128
$realHeader = array_splice($this->tagsFileContent, 0, count($expectedHeader));

0 commit comments

Comments
 (0)