Skip to content
Snippets Groups Projects
Commit b82e545d authored by hugronaphor's avatar hugronaphor Committed by Alex Andrascu
Browse files

Issue #2937840 by hugronaphor: Avoid "Unable to find the wrapper "private"" error

parent 16ddf1bf
No related branches found
No related tags found
No related merge requests found
......@@ -248,6 +248,19 @@ class DirectoryDestination extends DestinationBase implements ListableDestinatio
// Read the list of files from the directory.
$dir = $this->confGet('directory');
/** @var \Drupal\Core\File\FileSystemInterface $fileSystem */
$fileSystem = \Drupal::service('file_system');
$scheme = $fileSystem->uriScheme($dir);
// Ensure the stream is configured.
if (!$fileSystem->validScheme($scheme)) {
drupal_set_message(t('Your @scheme stream is not configured.', [
'@scheme' => $scheme . '://'
]), 'warning');
return $files;
}
if ($handle = opendir($dir)) {
while (FALSE !== ($file = readdir($handle))) {
$filepath = $dir . '/' . $file;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment