Merge pull request #949 from keriati/fix/554-private-app-icon

fix: Don't write existing icons to disk
This commit is contained in:
KodeStar 2022-11-13 23:22:54 +00:00 committed by GitHub
commit 198ffd7665
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -214,7 +214,9 @@ class ItemController extends Controller
if (strpos($path, 'icons/icons/') !== false) {
$path = str_replace('icons/icons/','icons/',$path);
}
if(! Storage::disk('public')->exists($path)) {
Storage::disk('public')->put($path, $contents);
}
$request->merge([
'icon' => $path,
]);