Skip to content

Commit

Permalink
Don't trim leading slashes on local filesystem base URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan authored Apr 7, 2017
1 parent 591e898 commit acd66fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Filesystem/FilesystemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ protected function getLocalUrl($path)
// it as the base URL instead of the default path. This allows the developer to
// have full control over the base path for this filesystem's generated URLs.
if ($config->has('url')) {
return trim($config->get('url'), '/').'/'.ltrim($path, '/');
return rtrim($config->get('url'), '/').'/'.ltrim($path, '/');
}

$path = '/storage/'.$path;
Expand Down

0 comments on commit acd66fe

Please sign in to comment.