From 0ce4610c0ca7d748e37572711a57dc74383c8e74 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Thu, 4 Jun 2020 16:42:10 +0800 Subject: [PATCH] tiny tweaks --- app/Http/Controllers/SkinlibController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/SkinlibController.php b/app/Http/Controllers/SkinlibController.php index d82fb731..dfdb9354 100644 --- a/app/Http/Controllers/SkinlibController.php +++ b/app/Http/Controllers/SkinlibController.php @@ -63,9 +63,12 @@ class SkinlibController extends Controller public function show(Filter $filter, $tid) { $texture = Texture::find($tid); + /** @var User */ $user = Auth::user(); + /** @var FilesystemAdapter */ + $disk = Storage::disk('textures'); - if (!$texture || $texture && !Storage::disk('textures')->has($texture->hash)) { + if (!$texture || $texture && $disk->missing($texture->hash)) { if (option('auto_del_invalid_texture')) { if ($texture) { $texture->delete(); @@ -289,6 +292,7 @@ class SkinlibController extends Controller public function delete(Request $request) { $texture = Texture::find($request->tid); + /** @var User */ $user = Auth::user(); if (!$texture) {