Don't automatically mount on FileSystem factory

This is to maintain the same behaviour whether you use the factory or
the builder.
This commit is contained in:
adlawson 2015-07-21 12:15:40 +01:00
parent 3c4cecc423
commit dcd516c4e7
1 changed files with 2 additions and 14 deletions

View File

@ -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, ':/\\');
}
}