Clear unnecessary filesystems

This commit is contained in:
printempw 2018-06-28 18:25:31 +08:00
parent 657cfdfe36
commit 334eb7c3c5
3 changed files with 5 additions and 25 deletions

View File

@ -115,7 +115,7 @@ class UpdateController extends Controller
$update_cache = storage_path('update_cache');
if (! is_dir($update_cache)) {
if (false === Storage::disk('storage')->makeDirectory('update_cache')) {
if (false === Storage::disk('root')->makeDirectory('storage/update_cache')) {
return response(trans('admin.update.errors.write-permission'));
}
}

View File

@ -28,7 +28,7 @@ return [
|
*/
'cloud' => 's3',
'cloud' => 'testing',
/*
|--------------------------------------------------------------------------
@ -53,35 +53,15 @@ return [
'root' => base_path(),
],
'storage' => [
'driver' => 'local',
'root' => storage_path(),
],
'textures' => [
'driver' => menv('FS_DRIVER', 'local'),
'root' => storage_path('textures'),
'visibility' => 'public',
],
'cache' => [
'driver' => 'local',
'root' => storage_path('cache'),
'visibility' => 'public',
],
'testing' => [
'driver' => 'memory'
],
's3' => [
'driver' => 's3',
'key' => 'your-key',
'secret' => 'your-secret',
'region' => 'your-region',
'bucket' => 'your-bucket',
],
],
];

View File

@ -114,14 +114,14 @@ class UpdateControllerTest extends TestCase
$this->generateFakeUpdateFile();
// Prepare for downloading
Storage::disk('storage')->deleteDirectory('update_cache');
Storage::disk('root')->deleteDirectory('storage/update_cache');
$this->generateFakeUpdateInfo('4.0.0');
Storage::shouldReceive('disk')
->with('storage')
->with('root')
->once()
->andReturnSelf();
Storage::shouldReceive('makeDirectory')
->with('update_cache')
->with('storage/update_cache')
->once()
->andReturn(false);
$this->get('/admin/update/download?action=prepare-download')