1> protected function isPathInDirectories($path, $directories) {
2> if (!is_array($directories)) {
3> $directories = (array)$directories;
4> }
5> $realPath = $this->fileDriver->getRealPath($path);
6> $realPath = str_replace('\\', '/', $realPath); // extra code added
7> foreach ($directories as $directory) {
8> if (0 === strpos($realPath, $directory)) {
9> return true;
10> }
11> }
12> return false; }