Skip to content

Commit

Permalink
[9.x] Fix FTP root config (#40939)
Browse files Browse the repository at this point in the history
* Fix FTP root config

* Update src/Illuminate/Filesystem/FilesystemManager.php

Co-authored-by: Frank de Jonge <[email protected]>

Co-authored-by: Frank de Jonge <[email protected]>
  • Loading branch information
driesvints and frankdejonge authored Feb 10, 2022
1 parent 4c7cd8c commit 589f55d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Filesystem/FilesystemManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ public function createLocalDriver(array $config)
*/
public function createFtpDriver(array $config)
{
if (! isset($config['root'])) {
$config['root'] = '';
}

$adapter = new FtpAdapter(FtpConnectionOptions::fromArray($config));

return new FilesystemAdapter($this->createFlysystem($adapter, $config), $adapter, $config);
Expand Down

0 comments on commit 589f55d

Please sign in to comment.