diff --git a/system/Helpers/filesystem_helper.php b/system/Helpers/filesystem_helper.php index 47c829bbc3c6..4e0e8b1532e9 100644 --- a/system/Helpers/filesystem_helper.php +++ b/system/Helpers/filesystem_helper.php @@ -209,7 +209,7 @@ function get_filenames( try { foreach (new RecursiveIteratorIterator( - new RecursiveDirectoryIterator($sourceDir, RecursiveDirectoryIterator::SKIP_DOTS), + new RecursiveDirectoryIterator($sourceDir, RecursiveDirectoryIterator::SKIP_DOTS | FilesystemIterator::FOLLOW_SYMLINKS), RecursiveIteratorIterator::SELF_FIRST ) as $name => $object) { $basename = pathinfo($name, PATHINFO_BASENAME); diff --git a/user_guide_src/source/changelogs/v4.4.4.rst b/user_guide_src/source/changelogs/v4.4.4.rst index bb4250f1e63f..f7130f54e7a9 100644 --- a/user_guide_src/source/changelogs/v4.4.4.rst +++ b/user_guide_src/source/changelogs/v4.4.4.rst @@ -27,6 +27,12 @@ Validation rules matches and differs Bugs have been fixed in the case where ``matches`` and ``differs`` in the Strict and Traditional rules validate data of non-string types. +Filesystem Helper +================= + +:php:func:`get_filenames()` now follows symlink folders, which it previously just returned +without following. + *************** Message Changes *************** diff --git a/user_guide_src/source/helpers/filesystem_helper.rst b/user_guide_src/source/helpers/filesystem_helper.rst index 75062ae054a3..b95ae2134fb7 100644 --- a/user_guide_src/source/helpers/filesystem_helper.rst +++ b/user_guide_src/source/helpers/filesystem_helper.rst @@ -164,6 +164,8 @@ The following functions are available: the second parameter to 'relative' for relative paths or any other non-empty value for a full file path. + .. note:: Prior to v4.4.4, due to a bug, this function did not follow symlink folders. + Example: .. literalinclude:: filesystem_helper/010.php