Follow symlinks in Folder::all()

This commit is contained in:
Matias Griese
2016-09-09 10:40:16 +03:00
parent c16952a4c9
commit cf3cd3d2d1
3 changed files with 7 additions and 5 deletions

View File

@@ -3,6 +3,7 @@
1. [](#improved)
* Refactored `onPageNotFound` event to fire after `onPageInitialized`
* Follow symlinks in `Folder::all()`
1. [](#bugfix)
* Quietly skip missing streams in `Cache::clearCache()`

8
composer.lock generated
View File

@@ -794,12 +794,12 @@
"source": {
"type": "git",
"url": "https://github.com/rockettheme/toolbox.git",
"reference": "327db9748b112c2c2c843f931e1ad88659fc8482"
"reference": "352ce81c373ccb9a9c4b1ea5de0c10b95e54d7f2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/rockettheme/toolbox/zipball/327db9748b112c2c2c843f931e1ad88659fc8482",
"reference": "327db9748b112c2c2c843f931e1ad88659fc8482",
"url": "https://api.github.com/repos/rockettheme/toolbox/zipball/352ce81c373ccb9a9c4b1ea5de0c10b95e54d7f2",
"reference": "352ce81c373ccb9a9c4b1ea5de0c10b95e54d7f2",
"shasum": ""
},
"require": {
@@ -834,7 +834,7 @@
"php",
"rockettheme"
],
"time": "2016-08-25 23:28:38"
"time": "2016-09-09 07:27:11"
},
{
"name": "seld/cli-prompt",

View File

@@ -179,7 +179,8 @@ abstract class Folder
/** @var UniformResourceLocator $locator */
$locator = Grav::instance()['locator'];
if ($recursive) {
$flags = \RecursiveDirectoryIterator::SKIP_DOTS + \FilesystemIterator::UNIX_PATHS + \FilesystemIterator::CURRENT_AS_SELF;
$flags = \RecursiveDirectoryIterator::SKIP_DOTS + \FilesystemIterator::UNIX_PATHS
+ \FilesystemIterator::CURRENT_AS_SELF + \FilesystemIterator::FOLLOW_SYMLINKS;
if ($locator->isStream($path)) {
$directory = $locator->getRecursiveIterator($path, $flags);
} else {