From dcd516c4e792be2a244131b62fc7647e0c5ee51c Mon Sep 17 00:00:00 2001 From: adlawson Date: Tue, 21 Jul 2015 12:15:40 +0100 Subject: [PATCH] Don't automatically mount on FileSystem factory This is to maintain the same behaviour whether you use the factory or the builder. --- src/FileSystem.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/FileSystem.php b/src/FileSystem.php index b1a3578..bef36f8 100644 --- a/src/FileSystem.php +++ b/src/FileSystem.php @@ -41,7 +41,7 @@ class FileSystem implements FileSystemInterface LoggerInterface $logger ) { $this->wrapperClass = $wrapperClass; - $this->scheme = $this->formatScheme($scheme); + $this->scheme = rtrim($scheme, ':/\\'); $this->walker = $walker; $this->logger = $logger; $this->factory = $factory; @@ -58,10 +58,7 @@ class FileSystem implements FileSystemInterface { $builder = new FileSystemBuilder($scheme); - $fs = $builder->build(); - $fs->mount(); - - return $fs; + return $builder->build(); } /** @@ -139,13 +136,4 @@ class FileSystem implements FileSystemInterface return false; } - - /** - * @param string $scheme - * @return string - */ - protected function formatScheme($scheme) - { - return rtrim($scheme, ':/\\'); - } }