Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure only files are returned if requested #2089

Merged
merged 2 commits into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ In order to read more about upgrading and BC breaks have a look at the [UPGRADE
+ [#2081](https://github.com/luyadev/luya/pull/2081) Removed deprecated methods and/or added a deprecation error trigger.
+ [#2077](https://github.com/luyadev/luya/pull/2077) Fix issue with caching when using SVG widget and symbol names.
+ [#2085](https://github.com/luyadev/luya/pull/2085) Option to disable language override by resolved composition content in UrlManager.
+ [#2089](https://github.com/luyadev/luya/pull/2089) Ensure that `scanDirectoryFiles()` returns only files and not folders.

## 1.9.0 (11. February 2021)

Expand Down
5 changes: 4 additions & 1 deletion core/console/commands/ImportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ protected function scanDirectoryFiles($path, $ns, $module)
foreach (scandir($path) as $file) {
if (substr($file, 0, 1) !== '.') {
$files[] = [
'isFile' => is_file($path.DIRECTORY_SEPARATOR.$file),
'file' => $file,
'filePath' => $path.DIRECTORY_SEPARATOR.$file,
'module' => $module,
Expand All @@ -116,7 +117,9 @@ public function getDirectoryFiles($folderName)
if (array_key_exists($folderName, $this->_dirs)) {
foreach ($this->_dirs[$folderName] as $folder) {
foreach ($folder['files'] as $file) {
$files[] = $file;
if ($file['isFile']) {
$files[] = $file;
}
}
}
}
Expand Down