mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Skip deleting default avatar from disk on delete
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
ca7c0aa47c
commit
e373be7dde
|
@ -455,8 +455,9 @@ class SettingsController extends Controller
|
|||
|
||||
// Default avatar upload
|
||||
$setting = $request->handleImages($setting, 500, 'default_avatar', 'avatars', 'default_avatar');
|
||||
if ($request->input('clear_default_avatar') == '1') {
|
||||
if (($request->input('clear_default_avatar') == '1') && ($setting->default_avatar!='default.png')) {
|
||||
|
||||
\Log::debug('Deleting default avatar');
|
||||
if (($setting->default_avatar) && (Storage::exists('avatars/'.$setting->default_avatar))) {
|
||||
Storage::disk('public')->delete('avatars/'.$setting->default_avatar);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue