Skip to content
Snippets Groups Projects

Issue #3424290 check if file settings path exist

1 unresolved thread
2 files
+ 17
1
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -59,7 +59,9 @@ final class SiteFilesExcluder implements EventSubscriberInterface {
$path = $wrapper->getDirectoryPath();
if ($this->fileSystem->isAbsolutePath($path)) {
$event->addPathsRelativeToProjectRoot([realpath($path)]);
if ($path = realpath($path)) {
    • I'd rather we used $this->fileSystem->realpath() for this. Otherwise, no objections.

      • Author Maintainer

        $this->fileSystem in this case is \Symfony\Component\Filesystem\Filesystem and it doesn't have realPath() method. Maybe you are thinking of \Drupal\Core\File\FileSystem::realpath but we don't have that service here. We are using just realpath() in multiple places.

      • Please register or sign in to reply
Please register or sign in to reply
$event->addPathsRelativeToProjectRoot([$path]);
}
}
else {
$event->addPathsRelativeToWebRoot([$path]);
Loading