Browse Source

Update AvatarPipeline

Daniel Supernault 6 năm trước cách đây
mục cha
commit
047d89c1b2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/Jobs/AvatarPipeline/AvatarOptimize.php

+ 1 - 1
app/Jobs/AvatarPipeline/AvatarOptimize.php

@@ -67,7 +67,7 @@ class AvatarOptimize implements ShouldQueue
 
     protected function deleteOldAvatar($new, $current)
     {
-        if (storage_path('app/'.$new) == $current) {
+        if (storage_path('app/'.$new) == $current || $current == 'public/avatars/default.png') {
             return;
         }
         if (is_file($current)) {