Fixed Flex from indexing hidden folders/files as objects

This commit is contained in:
Matias Griese
2019-02-04 22:21:11 +02:00
parent cebe28e591
commit 24e6b6c8f1
3 changed files with 3 additions and 2 deletions

View File

@@ -11,6 +11,7 @@
1. [](#bugfix)
* Fixed non-namespaced exceptions in scheduler
* Fixed trailing slash redirect in multlang environment [#2350](https://github.com/getgrav/grav/issues/2350)
* Fixed Flex from indexing hidden folders/files as objects
# v1.6.0-rc.1
## 01/30/2019

View File

@@ -61,7 +61,7 @@ class FileStorage extends FolderStorage
$list = [];
/** @var \SplFileInfo $info */
foreach ($iterator as $filename => $info) {
if (!$info->isFile() || !($key = $this->getKeyFromPath($filename))) {
if (!$info->isFile() || !($key = $this->getKeyFromPath($filename)) || strpos($info->getFilename(), '.') === 0) {
continue;
}

View File

@@ -407,7 +407,7 @@ class FolderStorage extends AbstractFilesystemStorage
$list = [];
/** @var \SplFileInfo $info */
foreach ($iterator as $filename => $info) {
if (!$info->isDir()) {
if (!$info->isDir() || strpos($info->getFilename(), '.') === 0) {
continue;
}