diff --git a/modules/translation/library/Translation/Util/GettextTranslationHelper.php b/modules/translation/library/Translation/Util/GettextTranslationHelper.php index eb4b7438c..2fc420fd5 100644 --- a/modules/translation/library/Translation/Util/GettextTranslationHelper.php +++ b/modules/translation/library/Translation/Util/GettextTranslationHelper.php @@ -467,10 +467,13 @@ class GettextTranslationHelper $subdirs = array(); while (($filename = readdir($directoryHandle)) !== false) { + if ($filename[0] === '.' || $filename === 'vendor') { + continue; + } $filepath = $directory . DIRECTORY_SEPARATOR . $filename; if (preg_match('@^[^\.].+\.(' . implode('|', $this->sourceExtensions) . ')$@', $filename)) { $file->fwrite($filepath . PHP_EOL); - } elseif (is_dir($filepath) && !preg_match('@^(\.|\.\.)$@', $filename)) { + } elseif (! is_link($filepath) && is_dir($filepath)) { $subdirs[] = $filepath; } }