🔧
This commit is contained in:
@@ -16,8 +16,7 @@ use Symfony\Component\Mime\MimeTypes;
|
||||
|
||||
class Filesystem
|
||||
{
|
||||
use Conditionable;
|
||||
use Macroable;
|
||||
use Conditionable, Macroable;
|
||||
|
||||
/**
|
||||
* Determine if a file or directory exists.
|
||||
@@ -348,7 +347,7 @@ class Filesystem
|
||||
*
|
||||
* @param string $target
|
||||
* @param string $link
|
||||
* @return void
|
||||
* @return bool|null
|
||||
*/
|
||||
public function link($target, $link)
|
||||
{
|
||||
|
||||
@@ -316,6 +316,10 @@ class FilesystemManager implements FactoryContract
|
||||
$adapter = new PathPrefixedAdapter($adapter, $config['prefix']);
|
||||
}
|
||||
|
||||
if (str_contains($config['endpoint'] ?? '', 'r2.cloudflarestorage.com')) {
|
||||
$config['retain_visibility'] = false;
|
||||
}
|
||||
|
||||
return new Flysystem($adapter, Arr::only($config, [
|
||||
'directory_visibility',
|
||||
'disable_asserts',
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Illuminate\Filesystem;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Contracts\Filesystem\LockTimeoutException;
|
||||
|
||||
class LockableFile
|
||||
@@ -67,11 +66,7 @@ class LockableFile
|
||||
*/
|
||||
protected function createResource($path, $mode)
|
||||
{
|
||||
$this->handle = @fopen($path, $mode);
|
||||
|
||||
if (! $this->handle) {
|
||||
throw new Exception('Unable to create lockable file: '.$path.'. Please ensure you have permission to create files in this location.');
|
||||
}
|
||||
$this->handle = fopen($path, $mode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user