This commit is contained in:
2025-05-12 14:25:25 +02:00
parent ab2db755ef
commit 9e378ca2b7
2719 changed files with 46505 additions and 60181 deletions

View File

@@ -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)
{

View File

@@ -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',

View File

@@ -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);
}
/**